From 0e0d72e49fc492256c6030827c9512d45ba2f406 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 11 Mar 2011 13:36:37 -0800 Subject: [PATCH] brew cleanup - do not clean up keg-only brews for now --- Library/Homebrew/cmd/cleanup.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index f1d4ba68bc..c01f4b18fc 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