aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-09-11 18:55:46 +0800
committerXu Cheng2015-09-12 01:38:59 +0800
commitd911b5689a3e464f19b0756eb6eb4279d157cf53 (patch)
treedd4241dd9ec292532d23b43bedfcc8f5651537c3 /Library
parent7ce0a2dedbb580501557168cacf14e27525cd2ad (diff)
downloadbrew-d911b5689a3e464f19b0756eb6eb4279d157cf53.tar.bz2
keg_relocate: split relocate_install_names and relocate_text_files
For bottle with `:any_skip_relocation`, relocating text files is required.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/bottle.rb2
-rw-r--r--Library/Homebrew/formula_installer.rb2
-rw-r--r--Library/Homebrew/keg_relocate.rb2
3 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 156860b50..3a95759cd 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -169,6 +169,8 @@ module Homebrew
begin
keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
cellar, Keg::CELLAR_PLACEHOLDER, :keg_only => f.keg_only?
+ keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER,
+ cellar, Keg::CELLAR_PLACEHOLDER
keg.delete_pyc_files!
cd cellar do
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index f9c1ae42a..62637d2ee 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -708,6 +708,8 @@ class FormulaInstaller
keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s, :keg_only => formula.keg_only?
end
+ keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
+ Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
path.extend(InstallRenamed)
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index 963f219ba..7a2636dff 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -46,7 +46,9 @@ class Keg
end
end
end
+ end
+ def relocate_text_files(old_prefix, new_prefix, old_cellar, new_cellar)
files = text_files | libtool_files
files.group_by { |f| f.stat.ino }.each_value do |first, *rest|