parent
311dd6f5e8
commit
bb5a2b587e
@ -13,16 +13,12 @@ class Cleaner
|
|||||||
@f = f
|
@f = f
|
||||||
[f.bin, f.sbin, f.lib].select{ |d| d.exist? }.each{ |d| clean_dir d }
|
[f.bin, f.sbin, f.lib].select{ |d| d.exist? }.each{ |d| clean_dir d }
|
||||||
|
|
||||||
if ENV['HOMEBREW_KEEP_INFO']
|
|
||||||
# Get rid of the directory file, so it no longer bother us at link stage.
|
# Get rid of the directory file, so it no longer bother us at link stage.
|
||||||
info_dir_file = f.info + 'dir'
|
info_dir_file = f.info + 'dir'
|
||||||
if info_dir_file.file? and not f.skip_clean? info_dir_file
|
if info_dir_file.file? and not f.skip_clean? info_dir_file
|
||||||
puts "rm #{info_dir_file}" if ARGV.verbose?
|
puts "rm #{info_dir_file}" if ARGV.verbose?
|
||||||
info_dir_file.unlink
|
info_dir_file.unlink
|
||||||
end
|
end
|
||||||
else
|
|
||||||
f.info.rmtree if f.info.directory? and not f.skip_clean? f.info
|
|
||||||
end
|
|
||||||
|
|
||||||
prune
|
prune
|
||||||
end
|
end
|
||||||
|
|||||||
@ -12,7 +12,7 @@ module Homebrew extend self
|
|||||||
path.extend(ObserverPathnameExtension)
|
path.extend(ObserverPathnameExtension)
|
||||||
if path.symlink?
|
if path.symlink?
|
||||||
unless path.resolved_path_exists?
|
unless path.resolved_path_exists?
|
||||||
if ENV['HOMEBREW_KEEP_INFO'] and path.to_s =~ Keg::INFOFILE_RX
|
if path.to_s =~ Keg::INFOFILE_RX
|
||||||
path.uninstall_info unless ARGV.dry_run?
|
path.uninstall_info unless ARGV.dry_run?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class Keg < Pathname
|
|||||||
# check whether the file to be unlinked is from the current keg first
|
# check whether the file to be unlinked is from the current keg first
|
||||||
next if !dst.symlink? || !dst.exist? || src != dst.resolved_path
|
next if !dst.symlink? || !dst.exist? || src != dst.resolved_path
|
||||||
|
|
||||||
dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
|
dst.uninstall_info if dst.to_s =~ INFOFILE_RX
|
||||||
dst.unlink
|
dst.unlink
|
||||||
Find.prune if src.directory?
|
Find.prune if src.directory?
|
||||||
end
|
end
|
||||||
@ -130,7 +130,7 @@ class Keg < Pathname
|
|||||||
link_dir('share', mode) do |path|
|
link_dir('share', mode) do |path|
|
||||||
case path.to_s
|
case path.to_s
|
||||||
when 'locale/locale.alias' then :skip_file
|
when 'locale/locale.alias' then :skip_file
|
||||||
when INFOFILE_RX then ENV['HOMEBREW_KEEP_INFO'] ? :info : :skip_file
|
when INFOFILE_RX then :info
|
||||||
when LOCALEDIR_RX then :mkpath
|
when LOCALEDIR_RX then :mkpath
|
||||||
when *share_mkpaths then :mkpath
|
when *share_mkpaths then :mkpath
|
||||||
when /^icons\/.*\/icon-theme\.cache$/ then :skip_file
|
when /^icons\/.*\/icon-theme\.cache$/ then :skip_file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user