From b5f73f81013c57d19f1a3624939f0d07d379950e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 28 Oct 2013 10:26:04 +0000 Subject: 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.--- Library/Homebrew/cmd/versions.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index 6987fce8a..daca2469a 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -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 -- cgit v1.2.3