Unverified Commit 4b36a0ee authored by Carlo Cabrera's avatar Carlo Cabrera
Browse files

upgrade: don't upgrade unbottled dependents of upgraded formulae

We upgrade dependents of upgraded formulae to make sure that an upgrade
doesn't break anything. However, this reasoning applies only when a
dependent is bottled, since attempting a source build is just as likely
to break things, if not more.

I've opted not to restrict this to, say, users only on outdated versions
of macOS in order to cleanly handle other cases where this change should
also apply: Linux, or current versions of macOS in a non-default prefix.
parent e119bdc5
......@@ -276,6 +276,20 @@ module Homebrew
# Ensure we never attempt a source build for outdated dependents of upgraded formulae.
outdated_dependents, skipped_dependents = outdated_dependents.partition do |dependent|
dependent.bottled? && dependent.deps.all?(&:bottled?)
if skipped_dependents.present?
opoo <<~EOS
The following dependents of upgraded formulae are outdated but will not
be upgraded:
#{skipped_dependents * "\n "}
return if outdated_dependents.blank? && already_broken_dependents.blank?
outdated_dependents -= installed_formulae if dry_run
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment