Allow dependencies to still install

Oops bug.
This commit is contained in:
Max Howell 2012-03-07 13:48:04 +00:00
parent d830e17a12
commit 8fd2778a95
2 changed files with 8 additions and 3 deletions

View File

@ -63,7 +63,7 @@ module Homebrew extend self
installer.install installer.install
installer.caveats installer.caveats
installer.finish # includes link step installer.finish
rescue CannotInstallFormulaError => e rescue CannotInstallFormulaError => e
onoe e onoe e
rescue BuildError => e rescue BuildError => e
@ -71,7 +71,7 @@ module Homebrew extend self
puts puts
ensure ensure
# restore previous installation state if build failed # 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
end end

View File

@ -91,14 +91,19 @@ class FormulaInstaller
end end
def install_dependency dep def install_dependency dep
outdated_keg = Keg.new(dep.linked_keg.realpath) rescue nil
fi = FormulaInstaller.new dep fi = FormulaInstaller.new dep
fi.ignore_deps = true fi.ignore_deps = true
fi.show_header = false fi.show_header = false
oh1 "Installing #{f} dependency: #{dep}" oh1 "Installing #{f} dependency: #{dep}"
outdated_keg.unlink if outdated_keg
fi.install fi.install
Keg.new(dep.linked_keg.realpath).unlink if dep.linked_keg.directory?
fi.caveats fi.caveats
fi.finish fi.finish
ensure
# restore previous installation state if build failed
outdated_keg.link if outdated_keg and not dep.installed? rescue nil
end end
def caveats def caveats