diff options
| author | Misty De Meo | 2016-01-17 12:59:17 -0800 |
|---|---|---|
| committer | Misty De Meo | 2016-01-18 10:10:09 -0800 |
| commit | 09ba000be1cd6a2c40ddac1898abac1f6c5744ed (patch) | |
| tree | 4f2a1b573759d720af1a5204b123872250bf96d6 /Library | |
| parent | b118539c8c17147e76eed7a0caf44e537f170f43 (diff) | |
| download | brew-09ba000be1cd6a2c40ddac1898abac1f6c5744ed.tar.bz2 | |
Permit cleanup to remove outdated keg-only formulae
This check is not really relevant anymore; old-style, pre-opt installs
date from 2012 at the very latest, so it is very unlikely that any
packages remain which still link against these.
Refs Homebrew/homebrew#48139.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 3d8e26f44..fc1219a40 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1484,7 +1484,7 @@ class Formula eligible_for_cleanup = [] if installed? eligible_kegs = installed_kegs.select { |k| pkg_version > k.version } - if eligible_kegs.any? && eligible_for_cleanup? + if eligible_kegs.any? eligible_kegs.each do |keg| if keg.linked? opoo "Skipping (old) #{keg} due to it being linked" @@ -1492,8 +1492,6 @@ class Formula eligible_for_cleanup << keg end end - else - eligible_kegs.each { |keg| opoo "Skipping (old) keg-only: #{keg}" } end elsif installed_prefixes.any? && !pinned? # If the cellar only has one version installed, don't complain @@ -1504,25 +1502,6 @@ class Formula eligible_for_cleanup end - # @private - def eligible_for_cleanup? - # It used to be the case that keg-only kegs could not be cleaned up, because - # older brews were built against the full path to the keg-only keg. Then we - # introduced the opt symlink, and built against that instead. So provided - # no brew exists that was built against an old-style keg-only keg, we can - # remove it. - if !keg_only? || ARGV.force? - true - elsif opt_prefix.directory? - # SHA records were added to INSTALL_RECEIPTS the same day as opt symlinks - Formula.installed.select do |f| - f.deps.any? do |d| - d.to_formula.full_name == full_name rescue d.name == name - end - end.all? { |f| f.installed_prefixes.all? { |keg| Tab.for_keg(keg).HEAD } } - end - end - private def exec_cmd(cmd, args, out, logfn) |
