aboutsummaryrefslogtreecommitdiffstats
path: root/Library/ENV
diff options
context:
space:
mode:
authorMisty De Meo2016-03-28 10:26:21 -0700
committerMisty De Meo2016-04-04 15:30:22 -0700
commitf8cdab7d8a11d05fb7048a3674d832f427930b83 (patch)
tree3ee6bc681dbb5ebecfd5edaf721ac1e459efa8ea /Library/ENV
parent4fd5c5c159c0f8d2f848524e98d4cc938e2207e8 (diff)
downloadbrew-f8cdab7d8a11d05fb7048a3674d832f427930b83.tar.bz2
Make new keep? superenv logic opt-in
Closes #50425. Signed-off-by: Misty De Meo <mistydemeo@github.com>
Diffstat (limited to 'Library/ENV')
-rwxr-xr-xLibrary/ENV/4.3/cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 28c78b4f5..2edf2df80 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -201,6 +201,10 @@ class Cmd
end
def keep?(path)
+ # The logic in this method will eventually become the default,
+ # but is currently opt-in.
+ return keep_orig?(path) unless ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"]
+
# first two paths: reject references to Cellar or opt paths
# for unspecified dependencies
if path.start_with?(cellar) || path.start_with?(opt)
@@ -213,6 +217,11 @@ class Cmd
end
end
+ # The original less-smart version of keep_orig; will eventually be removed
+ def keep_orig?(path)
+ path.start_with?(prefix, cellar, tmpdir) || !path.start_with?("/opt", "/sw", "/usr/X11")
+ end
+
def cflags
args = []