Commit Graph
978 Commits
Author SHA1 Message Date
Max Howell bfda554d30 Use -march=native when we don't otherwise know
I believe this works nowadays. When I created Homebrew originally, it did nothing. Hence all the other logic.
2011-08-24 22:30:44 +01:00
Max Howell 22b829b2d9 Recursively scan for keg-only deps before generating build ENV
Remove cairo dep from gtk formula as a consequence.
2011-08-24 22:30:44 +01:00
Max Howell 31b51d0977 Rename install.rb to build.rb for clarity and great justice
It was just confusing, and since the `brew upgrade` refactor this makes more sense too.

Shame it still downloads in there etc. but whatever. Homebrew 2 will fix!
2011-08-24 22:30:44 +01:00
Max Howell 3da76d0f37 Record which keg is linked
Will be useful for a variety of reasons, but for now, I'm just using it to ensure install won't install again if something is already installed (use brew upgrade instead).

But means that brew switch and that can work properly etc.
2011-08-24 22:30:44 +01:00
Max Howell 179bad1b1d Fix keg exception pretty output 2011-08-24 22:30:43 +01:00
Max Howell 62bd378264 Implement bottles again
Bottles now pour purely, without doing all the other unnecessary stuff that happened before the `brew upgrade` code shuffle.

Formula.pourable? removed since it was install-specific metadata and not related to the formula itself. Now all such logic is in the FormulaInstaller which is much cleaner.

I also changed the bottle cache location to the normal directory and added a .bottle pre-extension. Thus you can see everything in one directory without messing about.
2011-08-24 22:30:43 +01:00
Max Howell 81f1fb38a9 brew upgrade
Consequence: you can no longer install when something is already installed, you must upgrade it. This doesn't apply if the formula in question was unlinked. You can still --force installs though.

Rationale: the old way of installing over the top would leave symlinks to multiple versions in /usr/local if the old version had a file the newer version didn't. The new upgrade command handles everything properly.
2011-08-24 22:30:43 +01:00
Max Howell 3fa883f150 Tidy ENV.rb 2011-08-24 22:30:43 +01:00
Max Howell 4342a6bfdc Observe all applicable options in handle_llvm_failure 2011-08-24 22:30:43 +01:00
Max Howell e18b1a21c3 Auto-substitute certain variables in DATA patches
HOMEBREW_PREFIX for example.
2011-08-24 22:30:43 +01:00
Max Howell 842ae1eeea Prettier brew uses output (columnate) 2011-08-24 22:30:43 +01:00
Max Howell 35391a309c HOMEBREW_CURL_ARGS so that tests can be more silent 2011-08-24 22:30:43 +01:00
Max Howell 26a66f80f6 oh1 stdout display function 2011-08-24 22:30:42 +01:00
Max Howell db4e971064 Constants that are used once are dumb
It just means nobody knows what is being done without scrolling up and down, up and down the file like a doofus on a pogo stick.
2011-08-24 22:30:42 +01:00
Max Howell 29a9dbece2 Revise cleanup text, we're removing, not uninstalling 2011-08-24 22:30:42 +01:00
Dave Bayer f16c72ef17 Fix uninstall.rb brew remove --force "Directory not empty" error
Finder activity such as moving the position of an icon can create an unexpected
.DS_Store file in a Cellar directory. This causes `brew remove --force` to throw
an error that is reported as

Error: Directory not empty - /usr/local/Cellar/<formula>

This fix avoids that error, by calling rmtree rather than rmdir.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-22 20:26:53 -07:00
Max Howell f78fb38689 Specify that they are symlinks 2011-08-22 10:26:01 +01:00
Max Howell ce6714a9f9 Blacklist MacRuby
For now we don't support this kind of thing because our formula is a worse option, even though you have to update it yourself.

Closes #6174
2011-08-19 16:01:39 +01:00
Max Howell 63da621a3f Only error out for sudo brew install
Note this only happens if Homebrew is *not* installed sudo. Which is most of the time true.

Fixes #6899
2011-08-17 12:30:21 +01:00
Jack Nagel 54dc96d840 Add keg-only text to brew info output
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-11 11:46:35 -07:00
Adam Vandenberg fae72fe7ca brew doctor: do not check TMPDIR if it is not set 2011-08-07 10:01:52 -07:00
Max Howell 9e5e27b425 Reset --hard after the first git init
We don't know what revision the tarball was when homebrew was installed, so all we can do really is hard reset. In theory some set of git commands should suffice, but apparently --soft and --mixed resets ended up putting stuff in the index which would break subsequent `brew updates`.

Fixes #6851
2011-08-06 11:11:06 +01:00
CharlieRoot 7b85ca778b Fix Xcode 4 compiler paths for --use-gcc
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-04 10:07:08 -07:00
Max Howell cbbad7a8d9 Prettier brew versions output 2011-08-02 14:45:37 +01:00
Max Howell ec2d785212 Bump copyright year 2011-08-02 14:45:26 +01:00
Max Howell d3e2c38fc6 Fix brew doctor if sbin directory doesn't exist 2011-08-02 14:45:03 +01:00
Jack Nagel cbcd4a32a6 Fix brew update local changes bug
Users were seeing local changes in their repository after updating, even
though they had made no local changes.

The repository setup sequence should use `git reset --soft` rather than
vanilla `git reset`, which defaults to '--mixed'. '--soft' updates
_only_ HEAD, leaving the index as-is, allowing future incantations of
`brew update` to proceed without errors.

Fixes #6732.
2011-08-02 13:21:06 +01:00
Max Howell 99448364f4 Oops, show proper git checkout command 2011-08-02 12:58:16 +01:00
Max Howell 5a21942563 Improvements to brew versions
The output happens as it is determined, rather than all at once, which is preferable for CLI commands. This meant I had to hard-code the left-justification.

The pre-amble warning is removed. Instead the command outputs the git checkout command for each she that you can type to get that old formula.

I decided that reseting the one file will work 99% of the time and that it is too risky to reset the whole repo, this will roll-back bug fixes. Instead we should add functionality to compat/ in order to support old formula as required. Sometimes deps may have to be rolled-back too, but the user will have to figure this out on an ad-hoc basis. We are assuming a failure sophisticated user anyway, one who would like to get old versions of stuff.

I moved most of the functions into Formula since IMO this makes more conceptual sense.

I made the she get abbreviated by git (using --abbrev-commit) itself so it as short as can be.
2011-08-02 12:34:33 +01:00
Max Howell eb447c8f61 Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable.
2011-08-02 12:22:58 +01:00
Sebastian Staudt 0b1f677b82 Added new command "versions" 2011-08-02 10:35:30 +01:00
Adam Vandenberg 1834609769 Fix brew update on Leopard 2011-07-31 10:32:09 -07:00
Mike McQuaid 91485b7afc Don't install bottles in non-default HOMEBREW_PREFIX. 2011-07-31 11:47:14 +01:00
Adam Vandenberg 9324ad5a15 fix doctor on 10.5 2011-07-30 22:24:19 -07:00
Adam Vandenberg 20d2edf18d Fix stripping of keg-only reasons 2011-07-30 10:11:35 -07:00
Max Howell c764712f19 Remove "boring" args from the pretty_args only
Dumb mistake. Sorry.

Closes #6722
2011-07-30 11:20:23 +01:00
Max Howell 4e5fe0a92f Strip keg_only? text to avoid double newlines 2011-07-30 11:04:11 +01:00
Max Howell 923f00c33e Exclude brew manpages from unbrewed. 2011-07-30 11:04:04 +01:00
Max Howell ce8c849578 Don't abort if /usr/local is not writable
Since this is our new policy for /usr/local.
2011-07-30 11:03:34 +01:00
Mike McQuaid 18446240b6 Build from source (for now) unless on Lion.
Longer-term we'll try and use install_name_tool to fix Lion
bottles so they run fine on 10.5 and/or 10.6.

Closes #6699.
2011-07-29 18:36:47 +01:00
Adam Vandenberg 7f5ab8cedc audit: make version checks strict only 2011-07-29 08:34:00 -07:00
Max Howell a60912ed24 Emphasise the consequence of not installing to /usr/local 2011-07-29 15:21:10 +01:00
Max Howell 21acfc1c7e Writability for /usr/local is no longer required
Provided the user installed with our installer anyway. It creates all the directories that Homebrew will need during its life thus negating the need for root writability.
2011-07-29 14:56:59 +01:00
Max Howell a95473a5a6 Make the check for a valid git repo better
Because the new installer creates the .git directory when it installs.
2011-07-29 14:55:41 +01:00
Max Howell fb2de567a5 Don't mention the sbin PATH issue unless files are there
Because the new installer will always create /usr/local/sbin. Because we must keep /usr/local root:wheel unless we want to be considered bad citizens.
2011-07-29 14:54:42 +01:00
Max Howell b4d84b106f Fix cache extension for github tarballs 2011-07-29 11:58:41 +01:00
Max Howell f929575f6a Don’t display boring configure arguments 2011-07-29 11:58:41 +01:00
risk 358f78a10a check for a valid $TMPDIR path in brew doctor
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-28 19:50:39 -07:00
Trevor Wennblom ee089053b3 Coerce flags to an array in remove_make_var!
This is needed for Ruby 1.9.x compatibility, but we still don't support
running Homebrew with anything other than a system provided 1.8.[67].

Fixes #6546

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-27 17:38:26 -07:00
Samuel Cochran 1b9598c34b Add MacOS.lion? for MACOS_VERSION == 10.7
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-27 08:16:16 -07:00