diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 978522a42d..96592eb4dc 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -340,7 +340,7 @@ class Bottle extend Forwardable - attr_reader :name, :resource, :cellar, :rebuild + attr_reader :name, :resource, :tag, :cellar, :rebuild def_delegators :resource, :url, :verify_download_integrity def_delegators :resource, :cached_download diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index 06cb02b602..20f1f965fe 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -33,16 +33,15 @@ module Utils end def file_outdated?(formula, file) + file = file.resolved_path + filename = file.basename.to_s return false if formula.bottle.blank? - bottle_ext, bottle_tag, = extname_tag_rebuild(filename) - return false if bottle_ext.blank? - return false if bottle_tag != tag.to_s + _, bottle_tag, bottle_rebuild = extname_tag_rebuild(filename) + return false if bottle_tag.blank? - bottle_url_ext, = extname_tag_rebuild(formula.bottle.url) - - bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext + bottle_tag != formula.bottle.tag.to_s || bottle_rebuild.to_i != formula.bottle.rebuild end def extname_tag_rebuild(filename)