aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2013-10-28 10:26:04 +0000
committerMike McQuaid2013-10-28 10:26:04 +0000
commitb5f73f81013c57d19f1a3624939f0d07d379950e (patch)
treec5aaebc29ab40d6915af2fcc469ad21523cb77db
parentea0bcf018a74cb6772f2d0fd2c5435b9f00fc793 (diff)
downloadhomebrew-b5f73f81013c57d19f1a3624939f0d07d379950e.tar.bz2
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.
-rw-r--r--Library/Homebrew/cmd/versions.rb10
1 files changed, 8 insertions, 2 deletions
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