diff options
| author | Mike McQuaid | 2016-09-18 16:31:58 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2016-09-18 16:31:58 +0100 | 
| commit | 997ccb044d21fccb1a95ef4eefad0fa892289e02 (patch) | |
| tree | 2948ea9c1d2bd6a0fce9cb7b6a4a874d45c7417b /Library/Homebrew/dev-cmd/bottle.rb | |
| parent | f4a8d28819f1fee73fcc63d08e70cb36eecdfb20 (diff) | |
| download | brew-997ccb044d21fccb1a95ef4eefad0fa892289e02.tar.bz2 | |
Relocate HOMEBREW_REPOSITORY when necessary.
Now that the default from the installer, our CI and soon all users
is `/usr/local/Homebrew` it's a lot easier to check if there's
references to it (as we cannot look for `/usr/local` as it's a too
commonly hardcoded path).
Diffstat (limited to 'Library/Homebrew/dev-cmd/bottle.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/bottle.rb | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 1a7da8eb9..0c13d5028 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -177,6 +177,7 @@ module Homebrew      tar_path = Pathname.pwd/tar_filename      prefix = HOMEBREW_PREFIX.to_s +    repository = HOMEBREW_REPOSITORY.to_s      cellar = HOMEBREW_CELLAR.to_s      ohai "Bottling #{filename}..." @@ -193,7 +194,8 @@ module Homebrew            keg.relocate_dynamic_linkage prefix, Keg::PREFIX_PLACEHOLDER,              cellar, Keg::CELLAR_PLACEHOLDER            keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER, -            cellar, Keg::CELLAR_PLACEHOLDER +            cellar, Keg::CELLAR_PLACEHOLDER, +            repository, Keg::REPOSITORY_PLACEHOLDER          end          keg.delete_pyc_files! @@ -248,6 +250,7 @@ module Homebrew            skip_relocation = true          else            relocatable = false if keg_contain?(prefix_check, keg, ignores) +          relocatable = false if keg_contain?(repository, keg, ignores)            relocatable = false if keg_contain?(cellar, keg, ignores)            if prefix != prefix_check              relocatable = false if keg_contain_absolute_symlink_starting_with?(prefix, keg) @@ -265,7 +268,8 @@ module Homebrew              keg.relocate_dynamic_linkage Keg::PREFIX_PLACEHOLDER, prefix,                Keg::CELLAR_PLACEHOLDER, cellar              keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix, -              Keg::CELLAR_PLACEHOLDER, cellar +              Keg::CELLAR_PLACEHOLDER, cellar, +              Keg::REPOSITORY_PLACEHOLDER, repository            end          end        end  | 
