bottle: only chdir into the cellar when tarring up the bottle
This commit is contained in:
parent
b6f8649496
commit
07006bfdd4
@ -127,14 +127,10 @@ module Homebrew extend self
|
||||
end
|
||||
|
||||
bottle_path = Pathname.pwd/filename
|
||||
sha1 = nil
|
||||
|
||||
prefix = HOMEBREW_PREFIX.to_s
|
||||
cellar = HOMEBREW_CELLAR.to_s
|
||||
|
||||
output = nil
|
||||
|
||||
HOMEBREW_CELLAR.cd do
|
||||
ohai "Bottling #{filename}..."
|
||||
|
||||
keg = Keg.new(f.prefix)
|
||||
@ -145,9 +141,11 @@ module Homebrew extend self
|
||||
keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
|
||||
cellar, Keg::CELLAR_PLACEHOLDER, :keg_only => f.keg_only?
|
||||
|
||||
HOMEBREW_CELLAR.cd do
|
||||
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
|
||||
# or an uncompressed tarball (and more bandwidth friendly).
|
||||
safe_system 'tar', 'czf', bottle_path, "#{f.name}/#{f.version}"
|
||||
end
|
||||
|
||||
if File.size?(bottle_path) > 1*1024*1024
|
||||
ohai "Detecting if #{filename} is relocatable..."
|
||||
@ -172,18 +170,16 @@ module Homebrew extend self
|
||||
end
|
||||
end
|
||||
|
||||
sha1 = bottle_path.sha1
|
||||
|
||||
bottle = Bottle.new
|
||||
bottle.prefix HOMEBREW_PREFIX
|
||||
bottle.cellar relocatable ? :any : HOMEBREW_CELLAR
|
||||
bottle.revision bottle_revision
|
||||
bottle.sha1 sha1 => bottle_tag
|
||||
bottle.sha1 bottle_path.sha1 => bottle_tag
|
||||
|
||||
output = bottle_output bottle
|
||||
|
||||
puts "./#{filename}"
|
||||
output = bottle_output bottle
|
||||
puts output
|
||||
end
|
||||
|
||||
if ARGV.include? '--rb'
|
||||
bottle_base = filename.gsub(bottle_suffix(bottle_revision), '')
|
||||
|
Loading…
x
Reference in New Issue
Block a user