From cb024e222ced7c47f895c670686954fbc111a748 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 20 Jan 2014 15:26:18 -0800 Subject: [PATCH] bottle: only print relocations with --verbose. --- Library/Homebrew/cmd/bottle.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 1c3c7ab814..0d2bce448f 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -51,9 +51,10 @@ module Homebrew extend self index = 0 keg.each_unique_file_matching(string) do |file| - opoo "String '#{string}' still exists in these files:" if index.zero? - - puts "#{Tty.red}#{file}#{Tty.reset}" + if ARGV.verbose? + opoo "String '#{string}' still exists in these files:" if index.zero? + puts "#{Tty.red}#{file}#{Tty.reset}" + end # Check dynamic library linkage. Importantly, do not run otool on static # libraries, which will falsely report "linkage" to themselves. @@ -64,8 +65,10 @@ module Homebrew extend self linked_libraries = [] end - linked_libraries.each do |lib| - puts " #{Tty.gray}-->#{Tty.reset} links to #{lib}" + if ARGV.verbose? + linked_libraries.each do |lib| + puts " #{Tty.gray}-->#{Tty.reset} links to #{lib}" + end end # Use strings to search through the file for each string @@ -78,7 +81,9 @@ module Homebrew extend self offset, match = str.split(" ", 2) next if linked_libraries.include? match # Don't bother reporting a string if it was found by otool - puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}" + if ARGV.verbose? + puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}" + end end end @@ -149,7 +154,7 @@ module Homebrew extend self relocatable = !keg_contains(prefix_check, keg) relocatable = !keg_contains(HOMEBREW_CELLAR, keg) && relocatable - puts unless relocatable + puts if !relocatable && ARGV.verbose? rescue Interrupt ignore_interrupts { bottle_path.unlink if bottle_path.exist? } raise