aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-03-06 12:36:15 +0000
committerMike McQuaid2013-03-09 21:29:53 +0000
commitc7c33c98309790075e346f532ff7a49d007542e4 (patch)
treea81c31ab60e4856015f20989adefbbe58b9effec /Library
parent5a2874c6520b6997137b130a67c9a49977ce49bb (diff)
downloadbrew-c7c33c98309790075e346f532ff7a49d007542e4.tar.bz2
Warn on bottles skipped due to non-default Cellar.
Closes Homebrew/homebrew#18333.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottles.rb7
-rw-r--r--Library/Homebrew/formula_installer.rb2
2 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index 46aedcbd1..32b6f8471 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -9,7 +9,7 @@ def bottle_filename f, bottle_revision=nil
"#{name}-#{version}#{bottle_native_suffix(bottle_revision)}"
end
-def install_bottle? f
+def install_bottle? f, warn=false
return true if f.downloader and defined? f.downloader.local_bottle_path \
and f.downloader.local_bottle_path
@@ -17,7 +17,10 @@ def install_bottle? f
return false unless f.pour_bottle?
return false unless f.build.used_options.empty?
return false unless bottle_current?(f)
- return false if f.bottle.cellar != :any && f.bottle.cellar != HOMEBREW_CELLAR.to_s
+ if f.bottle.cellar != :any && f.bottle.cellar != HOMEBREW_CELLAR.to_s
+ opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}" if warn
+ return false
+ end
true
end
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 8cd47e6d2..0a1eba69e 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -25,7 +25,7 @@ class FormulaInstaller
end
def pour_bottle?
- install_bottle?(f) && (tab.used_options.empty? rescue true) && options.empty?
+ (tab.used_options.empty? rescue true) && options.empty? && install_bottle?(f, true)
end
def check_install_sanity