diff options
| author | Max Howell | 2011-08-23 23:30:52 +0100 |
|---|---|---|
| committer | Max Howell | 2011-08-24 22:30:43 +0100 |
| commit | 19e387d92e2741fa23cc6fde4743b1b8b28e0fa3 (patch) | |
| tree | 152d301d9ffe3d9cb8477645d928b6037d9ea6a9 /Library/Homebrew/cmd/install.rb | |
| parent | 3a0cf31ed0ffb33e5ae2c0d996902a983752589d (diff) | |
| download | brew-19e387d92e2741fa23cc6fde4743b1b8b28e0fa3.tar.bz2 | |
`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.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index b7f9e7cae..4b2711994 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -57,22 +57,26 @@ module Homebrew extend self end end - def install_formulae formulae - formulae = [formulae].flatten.compact - return if formulae.empty? - + def perform_preinstall_checks check_ppc check_writable_install_location check_cc check_macports + end - formulae.each do |f| - begin - installer = FormulaInstaller.new f - installer.ignore_deps = ARGV.include? '--ignore-dependencies' - installer.go - rescue FormulaAlreadyInstalledError => e - opoo e.message + def install_formulae formulae + formulae = [formulae].flatten.compact + unless formulae.empty? + perform_preinstall_checks + formulae.each do |f| + begin + fi = FormulaInstaller.new(f) + fi.install + fi.caveats + fi.finish + rescue FormulaAlreadyInstalledError => e + opoo e.message + end end end end |
