From 3af3bc7dd5417c2ce17807e44be968ec63824936 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 25 Aug 2012 11:31:57 -0700 Subject: [PATCH] Rename tab 'built_bottle' to 'build_as_bottle'. --- Library/Homebrew/bottles.rb | 6 ++++-- Library/Homebrew/cmd/bottle.rb | 2 +- Library/Homebrew/tab.rb | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 20d675a66c..81c94262ef 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 75d299a527..9f2c597678 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 1a334600df..e28ce1eda5 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