From 8848857cead43e54a0d2fde85d902096160d95bb Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 15 Oct 2011 00:39:05 -0500 Subject: [PATCH] audit: check mirror URLs This will actually throw some possibly unwanted warnings, e.g. whining about using mirrors.kernel.org for Debian software; we might only want that warning for the default URL. Perhaps mirrors deserve their own audit_formula_mirrors, but rather than duplicate code, let's just check them against the standard criteria for now. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/audit.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index fce3d869e5..1a57ab80ad 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -178,6 +178,11 @@ def audit_formula_urls f urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?} + f.mirrors.each do |m| + mirror = m.values_at :url + urls << (mirror.to_s rescue nil) + end + # Check SourceForge urls urls.each do |p| # Is it a filedownload (instead of svnroot)