versions: fix bottle_filenames.

Previously if a bottle had no checksum for a particular platform (i.e.
currently there are no Mavericks bottles) then it would generate a
different revision (and thus filename) to the rest of the bottles being
generated which meant bottles needed to be manually renamed.

Instead check the actual bottle object's checksums to make sure that
we've looked at the previous bottles for all platforms rather than just
the current one.
This commit is contained in:
Mike McQuaid 2013-10-28 10:26:04 +00:00
parent f01a38772a
commit fdc08424af

View File

@ -39,12 +39,18 @@ class Formula
def bottle_filenames branch='HEAD'
filenames = []
rev_list(branch).each do |sha|
filename = formula_for_sha(sha) {|f| bottle_filename f if f.bottle }
filename = formula_for_sha(sha) do |f|
bottle_block = f.class.send(:bottle)
unless bottle_block.checksums.empty?
revision = bottle_block.revision
bottle_filename f, revision
end
end
unless filenames.include? filename or filename.nil?
filenames << filename
end
end
return filenames
filenames
end
def pretty_relative_path