aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2014-01-20 15:26:18 -0800
committerMike McQuaid2014-01-20 15:26:31 -0800
commitcb024e222ced7c47f895c670686954fbc111a748 (patch)
tree873298a6bc6db09c2a348bd05e0b0c2420b5ea5f
parentf4cd66a88f3242cf7e0de4885d46718367a2c0b4 (diff)
downloadbrew-cb024e222ced7c47f895c670686954fbc111a748.tar.bz2
bottle: only print relocations with --verbose.
-rw-r--r--Library/Homebrew/cmd/bottle.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 1c3c7ab81..0d2bce448 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