aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2013-10-28 10:26:04 +0000
committerMike McQuaid2013-10-28 10:26:04 +0000
commitfdc08424afcbbb6a6ab7e23864b3f241a1353065 (patch)
tree785a7704d1b591e46a08c1cf81a701cde2c78723 /Library/Homebrew
parentf01a38772aa7e865a38c71e73661fb14825da9b9 (diff)
downloadbrew-fdc08424afcbbb6a6ab7e23864b3f241a1353065.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.
Diffstat (limited to 'Library/Homebrew')
-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