diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index fd8baf4a4..ffbd02cfc 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -231,6 +231,13 @@ class Formula active_spec.bottle_disable_reason end + # Does the currently active {SoftwareSpec} has any bottle? + # @private + def bottle_defined? + active_spec.bottle_defined? + end + + # Does the currently active {SoftwareSpec} has an installable bottle? # @private def bottled? active_spec.bottled? @@ -1197,7 +1204,8 @@ class Formula hsh["bottle"] = {} %w[stable devel].each do |spec_sym| next unless spec = send(spec_sym) - next unless (bottle_spec = spec.bottle_specification).checksums.any? + next unless spec.bottle_defined? + bottle_spec = spec.bottle_specification bottle_info = { "revision" => bottle_spec.revision, "cellar" => (cellar = bottle_spec.cellar).is_a?(Symbol) ? \ diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index d2c811b69..92b6b7a9c 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -75,6 +75,10 @@ class SoftwareSpec @bottle_disable_reason end + def bottle_defined? + bottle_specification.collector.keys.any? + end + def bottled? bottle_specification.tag?(bottle_tag) && \ (bottle_specification.compatible_cellar? || ARGV.force_bottle?) |
