aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-11-03 19:58:29 -0600
committerJack Nagel2013-11-03 20:19:54 -0600
commit2cdb430bbadbdec84592db3f4dceffd49ccea019 (patch)
tree014362a86d4aa4d1ed6cb4369f24e32cc1aacbe8
parentd847fda581d06429cca5e5d4835eaac38f5b7987 (diff)
downloadhomebrew-2cdb430bbadbdec84592db3f4dceffd49ccea019.tar.bz2
Move superenv make_fuss output back to stderr
In 6e3a585607116d06f47aac2ff5a649f2898216f0 ("Improve superenv add/remove message."), more debugging information was added to the "make_fuss" output generated by the superenv compiler wrapper. This resulted in some breakage in configure scripts that inspect stderr, so in e1bd9b9e980c433878e60833f09964b8ca996657 ("Don't use stderr for make_fuss output."), the output was moved to stdout. This only appeared to solve the problem, since stdout is buffered but stderr is not. Later, in fb749e47509b77b5bd89e7b14f0a1097d4af7f40, Homebrew started generating logs even in verbose mode. This had the side effect of moving stdout/stderr from a TTY to a pipe, and thus stdout was no longer line-buffered. Since it was not line-buffered, and Ruby's internal buffers were not flushed, the debug output was being lost. This was addressed in 2d5724af8613c820b8c14f4171fe1de6a17f10c3 ("cc: ensure wrapper output is always flushed"). This caused stdout to be flushed during configure, which resurfaced the original bug that prompted e1bd9b9e980c433878e60833f09964b8ca996657. This was fixed by disabling the debug output during configure, in f1779837a46a58520560fba3850a0e2992284d0a. Since the original bug has been addressed in a more robust way, we can move the debug output back to stderr. Fixes #23923.
-rwxr-xr-xLibrary/ENV/4.3/cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 05ee3bf53..30f32b04a 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -232,9 +232,9 @@ class Cmd
adds = args - @args
dups = dels & args
- puts "brew: superenv removed: #{dels*' '}" unless dels.empty?
- puts "brew: superenv deduped: #{dups}" unless dups.empty?
- puts "brew: superenv added: #{adds*' '}" unless adds.empty?
+ STDERR.puts "brew: superenv removed: #{dels*' '}" unless dels.empty?
+ STDERR.puts "brew: superenv deduped: #{dups}" unless dups.empty?
+ STDERR.puts "brew: superenv added: #{adds*' '}" unless adds.empty?
end
def verbose?
!ENV['VERBOSE'].nil? || !ENV['HOMEBREW_VERBOSE'].nil?