diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 80778b2b52..0c247e5d83 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -14,7 +14,7 @@ def install_bottle? f, options={:warn=>false} return false unless f.pour_bottle? return false unless f.bottle - if f.bottle.cellar != :any && f.bottle.cellar != HOMEBREW_CELLAR.to_s + unless f.bottle.compatible_cellar? if options[:warn] opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}" end diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 9574dd2d35..4706e5ab49 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -121,6 +121,10 @@ class Bottle @cellar = spec.cellar @revision = spec.revision end + + def compatible_cellar? + cellar == :any || cellar == HOMEBREW_CELLAR.to_s + end end class BottleSpecification