aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2012-08-25 11:31:57 -0700
committerMike McQuaid2012-08-25 11:52:37 -0700
commit3af3bc7dd5417c2ce17807e44be968ec63824936 (patch)
tree72751d317d17a7ecf5efec9477c9a7e61fc95fb2
parentebbc3438a1e6f9014d049c98c54182a31212b1d8 (diff)
downloadbrew-3af3bc7dd5417c2ce17807e44be968ec63824936.tar.bz2
Rename tab 'built_bottle' to 'build_as_bottle'.
-rw-r--r--Library/Homebrew/bottles.rb6
-rw-r--r--Library/Homebrew/cmd/bottle.rb2
-rw-r--r--Library/Homebrew/tab.rb8
3 files changed, 9 insertions, 7 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index 20d675a66..81c94262e 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -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
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 75d299a52..9f2c59767 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -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
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 1a334600d..e28ce1eda 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -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