diff options
| author | Jack Nagel | 2014-02-28 11:16:55 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-02-28 11:16:55 -0600 |
| commit | 353547f4db70a907f39526bb0bbad5c6513b7e64 (patch) | |
| tree | 57190a35947bcba2f0d41d5dc851ca9a13c4f95e /Library | |
| parent | 9f30868ba1fe240a2885d221eb956b1991d1e5a3 (diff) | |
| download | homebrew-353547f4db70a907f39526bb0bbad5c6513b7e64.tar.bz2 | |
FormulaInstaller: verify dependencies map to formulae before locking
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 3f3f72235..e8ed5ad63 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -31,6 +31,7 @@ class FormulaInstaller @poured_bottle = false @pour_failed = false + verify_deps_exist lock check_install_sanity end @@ -41,6 +42,13 @@ class FormulaInstaller install_bottle?(f, install_bottle_options) end + def verify_deps_exist + f.recursive_dependencies.map(&:to_formula) + rescue FormulaUnavailableError => e + e.dependent = f.name + raise + end + def check_install_sanity raise FormulaInstallationAlreadyAttemptedError, f if @@attempted.include? f @@ -70,12 +78,6 @@ class FormulaInstaller raise CannotInstallFormulaError, "You must `brew link #{unlinked_deps*' '}' before #{f} can be installed" unless unlinked_deps.empty? end - - rescue FormulaUnavailableError => e - # this is sometimes wrong if the dependency chain is more than one deep - # but can't easily fix this without a rewrite FIXME-brew2 - e.dependent = f.name - raise end def build_bottle_preinstall |
