Merge pull request #13633 from carlocab/migrate-gcc-dependents
update-report: migrate GCC recursive dependents
This commit is contained in:
commit
a93906a159
@ -148,6 +148,8 @@ module Homebrew
|
|||||||
Homebrew.failed = true if ENV["HOMEBREW_UPDATE_FAILED"]
|
Homebrew.failed = true if ENV["HOMEBREW_UPDATE_FAILED"]
|
||||||
return if Homebrew::EnvConfig.disable_load_formula?
|
return if Homebrew::EnvConfig.disable_load_formula?
|
||||||
|
|
||||||
|
migrate_gcc_dependents_if_needed
|
||||||
|
|
||||||
hub = ReporterHub.new
|
hub = ReporterHub.new
|
||||||
|
|
||||||
updated_taps = []
|
updated_taps = []
|
||||||
@ -289,6 +291,26 @@ module Homebrew
|
|||||||
#{e}
|
#{e}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def migrate_gcc_dependents_if_needed
|
||||||
|
return if OS.mac?
|
||||||
|
return if Settings.read("gcc-rpaths.fixed") == "true"
|
||||||
|
|
||||||
|
Formula.installed.each do |formula|
|
||||||
|
next unless formula.tap&.core_tap?
|
||||||
|
next unless formula.recursive_dependencies.map(&:name).include? "gcc"
|
||||||
|
|
||||||
|
keg = formula.installed_kegs.last
|
||||||
|
tab = Tab.for_keg(keg)
|
||||||
|
# Force reinstallation upon `brew upgrade` to fix the bottle RPATH.
|
||||||
|
tab.source["versions"]["version_scheme"] = -1
|
||||||
|
tab.write
|
||||||
|
rescue TapFormulaUnavailableError
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
|
Settings.write "gcc-rpaths.fixed", true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Reporter
|
class Reporter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user