Skip to content

Commit

Permalink
formulae_dependents: avoid trying to install bottles that were not built
Browse files Browse the repository at this point in the history
Actually fixes what #1217 was trying to fix.
  • Loading branch information
carlocab committed Sep 14, 2024
1 parent cf79462 commit 693fa08
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/tests/formulae_dependents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ class FormulaeDependents < TestFormulae
attr_writer :testing_formulae, :tested_formulae

def run!(args:)
unneeded_formulae = @tested_formulae - @testing_formulae
skipped_or_failed_formulae ||= []
skipped_or_failed_formulae += unneeded_formulae

info_header "Skipped or failed formulae:"
puts skipped_or_failed_formulae

@testing_formulae_with_tested_dependents = []
@tested_dependents_list = Pathname("tested-dependents-#{Utils::Bottles.tag}.txt")

@dependent_testing_formulae = sorted_formulae - skipped_or_failed_formulae
unneeded_formulae = @tested_formulae - @testing_formulae
@dependent_testing_formulae -= unneeded_formulae

install_formulae_if_needed_from_bottles!(args:)

Expand All @@ -40,7 +42,7 @@ def run!(args:)
private

def install_formulae_if_needed_from_bottles!(args:)
(@tested_formulae - skipped_or_failed_formulae).each do |formula_name|
@dependent_testing_formulae.each do |formula_name|
formula = Formulary.factory(formula_name)
next if formula.latest_version_installed?

Expand Down

0 comments on commit 693fa08

Please sign in to comment.