From 85452c5e910abf3280614248923c3bdbe2095a6e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 18 Mar 2012 20:47:57 +1300 Subject: [PATCH] Fix bottles on non-Lion. --- Library/Homebrew/bottles.rb | 11 ++--------- Library/Homebrew/formula.rb | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 50def92e50..f64c91eb52 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -10,14 +10,7 @@ def bottles_supported? end def install_bottle? f - !ARGV.build_from_source? && bottle_current?(f) && bottle_native?(f) -end - -def bottle_native? f - return true if bottle_native_regex.match(f.bottle_url) - # old brew bottle style - return true if MacOS.lion? && old_bottle_regex.match(f.bottle_url) - return false + !ARGV.build_from_source? && bottle_current?(f) end def built_bottle? f @@ -25,7 +18,7 @@ def built_bottle? f end def bottle_current? f - !f.bottle_url.nil? && Pathname.new(f.bottle_url).version == f.version + f.bottle_url && f.bottle_sha1 && Pathname.new(f.bottle_url).version == f.version end def bottle_native_suffix diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 6604bdad36..4cc3dcdd78 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -664,7 +664,7 @@ private key, value = sha1.shift @sha1 = key if value == MacOS.cat when String - @sha1 = sha1 + @sha1 = sha1 if MacOS.lion? end end