diff options
| author | Max Howell | 2012-03-07 13:48:04 +0000 |
|---|---|---|
| committer | Max Howell | 2012-03-07 13:48:04 +0000 |
| commit | 8fd2778a950c914bbf8c247b0e6dafc5d40e1bf6 (patch) | |
| tree | 49bc09cd40848564c472626835a46308bae9b6b3 /Library | |
| parent | d830e17a126a5ea4b77d5f0771eeafbf8ed2b5e7 (diff) | |
| download | brew-8fd2778a950c914bbf8c247b0e6dafc5d40e1bf6.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 |
