aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/install.rb
AgeCommit message (Collapse)Author
2013-10-22Different regex for user/tap/formula and user/tap.Mike McQuaid
Closes #23430.
2013-10-21install: silently ignore already tapped taps.Mike McQuaid
2013-10-21install: fix trying to tap local bottles.Mike McQuaid
2013-10-21install: tap if full tap formula format given.Mike McQuaid
Closes #23411. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-09-05Revert Library/Homebrew/cmd/install.rb to 4b320eec.Xiyue Deng
* Fix problem when install exception got swallow and reinstall thinks it succeeded.
2013-09-05reinstall cleanupSamuel John
2013-09-05Make reinstall transaction safe.Xiyue Deng
* Aborting during reinstall will now restore the originally installed keg. - Change install code to pass on CannotInstallFormulaError exception to caller so it can be reused in reinstall. * Add "--force-new-install" flag to force installing a new formula. Closes #22190. Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-06-14Use Hardware::CPU moduleJack Nagel
2013-06-12install: remove overcautious array manipulationJack Nagel
2013-06-08Consolidate sudo checks.Adam Vandenberg
Closes #20318.
2013-05-22Refactor Xcode/CLT version checksJack Nagel
2013-04-03Don't error out when a package is already installedJack Nagel
Fixes #17010.
2013-01-10Don't attempt installation multiple timesJack Nagel
When a dependency of a formula specified on the command-line is also specified, *after* the dependent formula, installation proceeds as part of the dependent's dependency tree and then is attempted again because the user asked for it explicitly. This results in the installer raising a CannotInstallFormulaError because it has already been installed. For example: $ brew install graphviz pkg-config ==> Installing graphviz dependency: pkg-config ... ==> Installing graphviz ... Error: pkg-config-0.27.1 already installed We already have a mechanism for dealing with this, but it does not kick in early enough. Move the installation attempt check into FormulaInstaller#check_install_sanity and catch the exception in the appropriate places. Fixes #16957.
2012-12-27Replace sceaga/homebrew with mistydemeo/tigerbrewMisty De Meo
@sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/ Tiger users' best bet.
2012-12-17Better reporting for MacPorts/Fink installationsJack Nagel
closes #15853.
2012-11-01Error out on lowercase --head parameter to install.Adam Vandenberg
Fixes #14815.
2012-08-31Doctor check for unlicensed XcodeMax Howell
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket. Closes #14558.
2012-08-10remove trailing whitespaceAdam Vandenberg
2012-08-10Be more verbose when users insist on being sudoersMax Howell
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
2012-08-06Fix issues with writable? detection in brew doctorBrandon Black
Closes #13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
2012-08-06Don't blacklist tapped-dupesMax Howell
If a formula is in Formula due to tapping or otherwise, don't prohibit installation. Really we should make the blacklist *really* stuff that should be blacklisted and then if it is available still require a --force. But currently with okay stuff like vim in there, and libxml2 being both blacklisted *and* in mxcl/master, we are screwing ourselves. TL;DR we should do some work on this component. Fixes #13234.
2012-04-30Add ofail command and fix bottle command output.Mike McQuaid
2012-03-29Exit with bad exit code on command failures.Mike McQuaid
2012-03-20Update Xcode version checksJack Nagel
Closes #11044. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-10Remove bad exit status; need to fix another way.Mike McQuaid
2012-03-09Add better Unix exit codes.Mike McQuaid
Closes #10809.
2012-03-07Stop supporting `brew install --force'Max Howell
Rationale: it breaks stuff. You should not be able to install over something already installed *and* linked. brew now prompts you to unlink the existing linked keg first. I came to fix this because I discovered that `brew install foo` works without --force provided foo's formula version is different to that which is installed and linked. I'm not sure if this was intentionally broken, but it led to at least two tickets I found where people were getting crazy issues trying to install over the top of already installed previous versions. So I also fixed a whole category of other issues, mostly by moving error handling into FormulaInstaller. Now error's can be caught in Homebrew.install and handled on a formula-by-formula basis. I will next port this behaviour to upgrade.
2012-02-21Warn, don't advertise with a status headerMax Howell
2012-02-21Move this code into FormulaInstallerMax Howell
The correct location for it IMO. Also added warning for the user.
2012-02-19don't quit if already installedAdam Vandenberg
2012-02-10Remove LinkedKegs entry if we're writing the same oneJack Nagel
If a keg has been uninstalled via `rm -rf <keg>`, and a user tries to reinstall it without `brew unlink`ing it first, it will fail to link as the LinkedKegs entry still exists. This isn't desirable, and the user should be able to reinstall the same formula on top of the old, dead symlinks without problems, so let's just remove the LinkedKegs entry if it matches the one we are installing anyway. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10Don't return nil from Formula#linked_kegJack Nagel
Doing so was the result of a quick hack to fix the "deps installed as upgrades don't get linked" bug, but it was a mistake. Instead, always return the LinkedKegs entry as a Pathname object, and let callers be responsible for checking that it exists. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10Revert "install: unlink old kegs"Jack Nagel
This reverts commit 2eabe2cbc84649696aeb6fa842a70f3794955597. When Keg#unlink looks for symlinks relative to the keg, it can hit false positives that actually belong to a different keg and unlink them anyway. This breaks our "force identical directory symlinks to be shared real directory" case. This may be a problem in general with the unlinking code and should be investigated. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10install: unlink old kegsJack Nagel
If a formula makes it all the way to the actual install step, it is safe to unlink the keg before linking; this will prune dead symlinks in the case where a keg was removed with `rm -rf <keg>` but not unlinked with `brew unlink`. Fixes #10077. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04Warn the user of required argumentsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25Add `devel` to the DSL, + stable and bottle blocksMisty De Meo
This commit adds a `devel` entry to the DSL, allowing formulae to specify an unstable branch. `devel` takes a block, which should contain standard `url` and `md5` fields (and `version`, if necessary). This must come after the standard DSL fields. This commit also migrates over all formulae currently using `devel` to the new syntax, as well as formulae which used `head` for non-VCS urls. The new syntax is also available for `stable` and `bottle`. `stable` is an option alongside the old syntax. `bottle` replaces the old syntax. Note that the @stable ivar in Formula has been renamed to @standard, and the @bottle ivar has been renamed to @bottle_url. Closes #9735. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2011-12-18--HEAD checksAdam Vandenberg
* Force --HEAD for head-only installs * Don't allow --HEAD for stable-only formulae
2011-12-08IdiomsAdam Vandenberg
2011-12-02Restore --force behaviour in brew-installMisty De Meo
Fixes #8933. Closes #8936. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-27Re-work ARGV filtering to properly handle --HEADCharlie Sharpsteen
Previously, stripping arguments like `--HEAD` for dependencies failed because that flag affects the installation prefix encoded into formula objects. The previous implementation of `ARGV` filtering tried to contain all changes to a single method call before the `FormulaInstaller` forks. This update spreads things out a bit: - The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies` which strips flags like `--HEAD`, yields to a block, then restores the original contents of ARGV. - The `explicitly_requested?` test, which returns true or false depending on if a formula object is a member of `ARGV.formulae`, is now a method of `Formula` objects. - `FormulaInstaller` objects now execute the installation of dependencies inside an `ARGV.filter_for_dependencies` block if the dependency was `explicitly_requested?`. Fixes #8668. Closes #7724.
2011-09-15Check Cellar can be made before installing stuffMax Howell
Refs #5188.
2011-09-01Edit port/fink warningAdam Vandenberg
2011-09-01Edit port/fink warningAdam Vandenberg
2011-09-01Allow brew install --force againMax Howell
2011-08-24Record which keg is linkedMax Howell
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`brew upgrade`Max Howell
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-17Only error out for `sudo brew install`Max Howell
Note this only happens if Homebrew is *not* installed sudo. Which is most of the time true. Fixes #6899
2011-07-30Don't abort if /usr/local is not writableMax Howell
Since this is our new policy for /usr/local.
2011-06-06Reformat minimum Xcode checkAdam Vandenberg
2011-03-12Some CleanupMax Howell