diff options
| author | Max Howell | 2012-03-07 13:48:04 +0000 |
|---|---|---|
| committer | Max Howell | 2012-03-07 13:48:04 +0000 |
| commit | 8b04a82181d1b0d29b49db2b53d0f78bcf4dae1e (patch) | |
| tree | 13b7ebc6d75999b96bb421c84b9525813c8a7e2d /Library | |
| parent | 599cc70f39417b67b5902642f09dbba13ab42ace (diff) | |
| download | homebrew-8b04a82181d1b0d29b49db2b53d0f78bcf4dae1e.tar.bz2 | |
Allow dependencies to still install
Oops bug.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/upgrade.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 215ae3d14..9777c5ce5 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -63,7 +63,7 @@ module Homebrew extend self installer.install installer.caveats - installer.finish # includes link step + installer.finish rescue CannotInstallFormulaError => e onoe e rescue BuildError => e @@ -71,7 +71,7 @@ module Homebrew extend self puts ensure # restore previous installation state if build failed - outdated_keg.link if outdated_keg and not f.linked_keg.directory? + outdated_keg.link if outdated_keg and not f.installed? rescue nil end end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index e4b799ef7..7257f72ca 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -91,14 +91,19 @@ class FormulaInstaller end def install_dependency dep + outdated_keg = Keg.new(dep.linked_keg.realpath) rescue nil + fi = FormulaInstaller.new dep fi.ignore_deps = true fi.show_header = false oh1 "Installing #{f} dependency: #{dep}" + outdated_keg.unlink if outdated_keg fi.install - Keg.new(dep.linked_keg.realpath).unlink if dep.linked_keg.directory? fi.caveats fi.finish + ensure + # restore previous installation state if build failed + outdated_keg.link if outdated_keg and not dep.installed? rescue nil end def caveats |
