未验证 提交 4b36a0ee 编辑于 作者: Carlo Cabrera's avatar Carlo Cabrera
浏览文件

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.
上级 e119bdc5
......@@ -276,6 +276,20 @@ module Homebrew
installed_formulae.flat_map(&:runtime_installed_formula_dependents)
.uniq
.select(&:outdated?)
# 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?)
end
if skipped_dependents.present?
opoo <<~EOS
The following dependents of upgraded formulae are outdated but will not
be upgraded:
#{skipped_dependents * "\n "}
EOS
end
return if outdated_dependents.blank? && already_broken_dependents.blank?
outdated_dependents -= installed_formulae if dry_run
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册