diff options
| author | Tim D. Smith | 2015-04-06 23:23:55 -0700 | 
|---|---|---|
| committer | Tim D. Smith | 2015-04-09 00:42:51 -0700 | 
| commit | b48f83f5c4d6b3e6b8b7cd9394002245d88a6c7f (patch) | |
| tree | df5fbd08750b7fd5bc92c4fd1f8a5be6e7194af3 | |
| parent | 1d2e3ae110542862f88b2fd281af326686bfc1c4 (diff) | |
| download | homebrew-b48f83f5c4d6b3e6b8b7cd9394002245d88a6c7f.tar.bz2 | |
test-bot: don't check deps until taps are tapped
brew deps will fail silently if a formula has dependencies which live in
taps that have not yet been tapped. Delay checking brew deps until after
tap dependencies are discovered.
Closes #38424.
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 37 | 
1 files changed, 19 insertions, 18 deletions
| diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 291f7e78a..fa7737acf 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -366,24 +366,6 @@ module Homebrew        end        test "brew", "uses", canonical_formula_name -      installed = Utils.popen_read("brew", "list").split("\n") -      dependencies = Utils.popen_read("brew", "deps", "--skip-optional", -                                      canonical_formula_name).split("\n") -      dependencies -= installed -      unchanged_dependencies = dependencies - @formulae -      changed_dependences = dependencies - unchanged_dependencies - -      runtime_dependencies = Utils.popen_read("brew", "deps", -                                              "--skip-build", "--skip-optional", -                                              canonical_formula_name).split("\n") -      build_dependencies = dependencies - runtime_dependencies -      unchanged_build_dependencies = build_dependencies - @formulae - -      dependents = Utils.popen_read("brew", "uses", "--skip-build", "--skip-optional", canonical_formula_name).split("\n") -      dependents -= @formulae -      dependents = dependents.map {|d| Formulary.factory(d)} - -      testable_dependents = dependents.select { |d| d.test_defined? && d.bottled? }        formula = Formulary.factory(canonical_formula_name)        installed_gcc = false @@ -426,6 +408,25 @@ module Homebrew          return        end +      installed = Utils.popen_read("brew", "list").split("\n") +      dependencies = Utils.popen_read("brew", "deps", "--skip-optional", +                                      canonical_formula_name).split("\n") +      dependencies -= installed +      unchanged_dependencies = dependencies - @formulae +      changed_dependences = dependencies - unchanged_dependencies + +      runtime_dependencies = Utils.popen_read("brew", "deps", +                                              "--skip-build", "--skip-optional", +                                              canonical_formula_name).split("\n") +      build_dependencies = dependencies - runtime_dependencies +      unchanged_build_dependencies = build_dependencies - @formulae + +      dependents = Utils.popen_read("brew", "uses", "--skip-build", "--skip-optional", canonical_formula_name).split("\n") +      dependents -= @formulae +      dependents = dependents.map {|d| Formulary.factory(d)} + +      testable_dependents = dependents.select { |d| d.test_defined? && d.bottled? } +        if (deps | reqs).any? { |d| d.name == "mercurial" && d.build? }          test "brew", "install", "mercurial"        end | 
