From 43d1f6790b777b014c6cbcb11674ad1fdee63abc Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 18 Jun 2010 13:42:12 -0700 Subject: [PATCH] Note how to redownload tarballs on failed checksum. Fixes Homebrew/homebrew#659 --- Library/Homebrew/formula.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 9471f58b56..7f8b5ebc53 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -371,7 +371,14 @@ private hash = fn.incremental_hash(hasher) if supplied and not supplied.empty? - raise "#{type} mismatch\nExpected: #{supplied}\nGot: #{hash}\nArchive: #{fn}" unless supplied.upcase == hash.upcase + message = <<-EOF +#{type} mismatch +Expected: #{supplied} +Got: #{hash} +Archive: #{fn} +(To retry an incomplete download, remove the file above.) +EOF + raise message unless supplied.upcase == hash.upcase else opoo "Cannot verify package integrity" puts "The formula did not provide a download checksum"