prune: remove info dir entries for pruned files

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-02-01 22:36:07 -06:00
parent 8567570d97
commit 4ce8bdb32c

View File

@ -1,3 +1,5 @@
require 'keg'
module Homebrew extend self
# $n and $d are used by the ObserverPathnameExtension to keep track of
# certain filesystem actions.
@ -11,7 +13,12 @@ module Homebrew extend self
path.find do |path|
path.extend ObserverPathnameExtension
if path.symlink?
path.unlink unless path.resolved_path_exists?
unless path.resolved_path_exists?
if ENV['HOMEBREW_KEEP_INFO'] and path.to_s =~ Keg::INFOFILE_RX
path.uninstall_info
end
path.unlink
end
elsif path.directory?
dirs << path
end