aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-11 13:36:37 -0800
committerAdam Vandenberg2011-03-12 11:55:11 -0800
commitd89a2a0b7d50f3ab32f7c4dea3b86d295dde354d (patch)
treedf16ed711050c58c0f7292f167651649439019c4 /Library
parentca830014d882c1ff8fa4f1d71d7bbe96e9b58dff (diff)
downloadhomebrew-d89a2a0b7d50f3ab32f7c4dea3b86d295dde354d.tar.bz2
brew cleanup - do not clean up keg-only brews for now
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/cleanup.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index f1d4ba68b..c01f4b18f 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -25,6 +25,14 @@ module Homebrew extend self
f = Formula.factory f
rack = f.prefix.parent
+ # Don't clean up keg-only brews for now.
+ # Formulae link directly to them, so cleaning up old
+ # ones will break already compiled software.
+ if f.keg_only?
+ opoo "Skipping keg-only #{f.name}" if rack.children.length > 1
+ return
+ end
+
if f.installed? and rack.directory?
rack.children.each do |keg|
if f.installed_prefix != keg