aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb23
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)