Rename tab 'built_bottle' to 'build_as_bottle'.

This commit is contained in:
Mike McQuaid 2012-08-25 11:31:57 -07:00
parent ebbc3438a1
commit 3af3bc7dd5
3 changed files with 9 additions and 7 deletions

View File

@ -17,10 +17,12 @@ def install_bottle? f
not ARGV.build_from_source? and bottle_current?(f)
end
def built_bottle? f
def built_as_bottle? f
f = Formula.factory f unless f.kind_of? Formula
return false unless f.installed?
Tab.for_keg(f.installed_prefix).built_bottle
tab = Tab.for_keg(f.installed_prefix)
# Need to still use the old "built_bottle" until all bottles are updated.
tab.built_as_bottle or tab.built_bottle
end
def bottle_current? f

View File

@ -9,7 +9,7 @@ module Homebrew extend self
return
end
unless built_bottle? f
unless built_as_bottle? f
return ofail "Formula not installed with '--build-bottle': #{f.name}"
end

View File

@ -12,7 +12,7 @@ class Tab < OpenStruct
Tab.new :used_options => args.used_options(f),
:unused_options => args.unused_options(f),
:tabfile => f.prefix + "INSTALL_RECEIPT.json",
:built_bottle => !!args.build_bottle?,
:built_as_bottle => !!args.build_bottle?,
:tapped_from => f.tap
end
@ -34,7 +34,7 @@ class Tab < OpenStruct
rescue FormulaUnavailableError
Tab.new :used_options => [],
:unused_options => [],
:built_bottle => false,
:built_as_bottle => false,
:tapped_from => ""
end
end
@ -62,7 +62,7 @@ class Tab < OpenStruct
def self.dummy_tab f
Tab.new :used_options => [],
:unused_options => f.build.as_flags,
:built_bottle => false,
:built_as_bottle => false,
:tapped_from => ""
end
@ -78,7 +78,7 @@ class Tab < OpenStruct
MultiJson.encode({
:used_options => used_options,
:unused_options => unused_options,
:built_bottle => built_bottle,
:built_as_bottle => built_as_bottle,
:tapped_from => tapped_from
})
end