diff options
| author | Mike McQuaid | 2012-03-18 15:14:14 +1300 |
|---|---|---|
| committer | Mike McQuaid | 2012-03-18 15:16:57 +1300 |
| commit | d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83 (patch) | |
| tree | b4d6733357293161971ffd52f36f1635c92adebd /Library/Homebrew/cmd/fetch.rb | |
| parent | 059727a9e8e5fc2e7a65727a1d81e31a8af72f89 (diff) | |
| download | brew-d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83.tar.bz2 | |
Use fetch for downloading bottles.
Fixes Homebrew/homebrew#10958.
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 5d1bec529..28f51f71a 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -29,21 +29,23 @@ module Homebrew extend self the_tarball, _ = f.fetch next unless the_tarball.kind_of? Pathname - previous_md5 = f.instance_variable_get(:@md5).to_s.downcase + bottle = install_bottle? f + + previous_md5 = f.instance_variable_get(:@md5).to_s.downcase unless bottle previous_sha1 = f.instance_variable_get(:@sha1).to_s.downcase - previous_sha2 = f.instance_variable_get(:@sha256).to_s.downcase + previous_sha2 = f.instance_variable_get(:@sha256).to_s.downcase unless bottle - puts "MD5: #{the_tarball.md5}" + puts "MD5: #{the_tarball.md5}" unless bottle puts "SHA1: #{the_tarball.sha1}" - puts "SHA256: #{the_tarball.sha2}" + puts "SHA256: #{the_tarball.sha2}" unless bottle - unless previous_md5.nil? or previous_md5.empty? or the_tarball.md5 == previous_md5 + unless previous_md5.nil? or previous_md5.empty? or the_tarball.md5 == previous_md5 or bottle opoo "Formula reports different MD5: #{previous_md5}" end unless previous_sha1.nil? or previous_sha1.empty? or the_tarball.sha1 == previous_sha1 opoo "Formula reports different SHA1: #{previous_sha1}" end - unless previous_sha2.nil? or previous_sha2.empty? or the_tarball.sha2 == previous_sha2 + unless previous_sha2.nil? or previous_sha2.empty? or the_tarball.sha2 == previous_sha2 or bottle opoo "Formula reports different SHA256: #{previous_sha2}" end end |
