aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2016-11-06 03:46:22 -0800
committerilovezfs2016-11-06 04:00:14 -0800
commitc5bd5c4aa7f0595c91431407ff5bda4b1938afc3 (patch)
treeee9875af02695951fb287262c4fc524fbf7e34e2 /Library
parentf14a3a17decdcfd26fc9f2dc0958ee642241ea5a (diff)
downloadbrew-c5bd5c4aa7f0595c91431407ff5bda4b1938afc3.tar.bz2
bottle: improve relocatability check
Given how common it is for formulae to hard-code `etc` and `var`, check for those paths (`/usr/local/etc` and `/usr/local/var`) when determing relocatability.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index b1a3ebb43..7e98f2ebb 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -251,6 +251,8 @@ module Homebrew
relocatable = false if keg_contain?(cellar, keg, ignores)
if prefix != prefix_check
relocatable = false if keg_contain_absolute_symlink_starting_with?(prefix, keg)
+ relocatable = false if keg_contain?("#{prefix}/etc", keg, ignores)
+ relocatable = false if keg_contain?("#{prefix}/var", keg, ignores)
end
skip_relocation = relocatable && !keg.require_relocation?
end