Fix bottles on non-Lion.

This commit is contained in:
Mike McQuaid 2012-03-18 20:47:57 +13:00
parent 64457b2315
commit 85452c5e91
2 changed files with 3 additions and 10 deletions

View File

@ -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

View File

@ -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