This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Warn on bottles skipped due to non-default Cellar.

Closes #18333.
  • Loading branch information...
1 parent febd499 commit a9a3cf7a19d1c429f21b74bc0ec6ba7b94eddae6 @MikeMcQuaid MikeMcQuaid committed Mar 6, 2013
Showing with 6 additions and 3 deletions.
  1. +5 −2 Library/Homebrew/bottles.rb
  2. +1 −1 Library/Homebrew/formula_installer.rb
@@ -9,15 +9,18 @@ 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
return false if ARGV.build_from_source?
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
@@ -25,7 +25,7 @@ def initialize ff
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)
@skalnik

skalnik Mar 11, 2013

Contributor

This (<code> rescue true) seems like a weird code smell to me, but maybe I'm off. Anyway to avoid that?

@MikeMcQuaid

MikeMcQuaid Mar 11, 2013

Owner

I didn't do that, just re-arranged the arguments.

end
def check_install_sanity

0 comments on commit a9a3cf7

Please sign in to comment.