From f8cdab7d8a11d05fb7048a3674d832f427930b83 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Mon, 28 Mar 2016 10:26:21 -0700 Subject: [PATCH] Make new keep? superenv logic opt-in Closes #50425. Signed-off-by: Misty De Meo --- Library/ENV/4.3/cc | 9 +++++++++ Library/Homebrew/cmd/test-bot.rb | 1 + 2 files changed, 10 insertions(+) diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 28c78b4f53..2edf2df805 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 = [] diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 42587d066d..fb28c5f3d6 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -856,6 +856,7 @@ module Homebrew ENV["HOMEBREW_SANDBOX"] = "1" ENV["HOMEBREW_NO_EMOJI"] = "1" ENV["HOMEBREW_FAIL_LOG_LINES"] = "150" + ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"] = "1" if ENV["TRAVIS"] ARGV << "--verbose"