diff options
| author | Jack Nagel | 2011-11-30 13:14:24 -0600 |
|---|---|---|
| committer | Jack Nagel | 2011-11-30 13:14:24 -0600 |
| commit | 6f83e20f4974d83b08bc7eab64a556477f2f4d20 (patch) | |
| tree | b8d51b1ddd0e8428ceeb27816b08fb5852f21fec /Library | |
| parent | 1657bb1fcf074f14fb7ceaa4a4d8c964563c6105 (diff) | |
| download | brew-6f83e20f4974d83b08bc7eab64a556477f2f4d20.tar.bz2 | |
audit: only perform GNU URL check on primary URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/cmd/audit.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 31c0fbaeb..d3ea129a4 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -198,6 +198,14 @@ def audit_formula_urls f urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?} urls.uniq! # head-only formulae result in duplicate entries + # Check GNU urls; doesn't apply to mirrors + urls.each do |p| + if p =~ %r[^(https?|ftp)://(.+)/gnu/] + problems << " * \"ftpmirror.gnu.org\" is preferred for GNU software." + end + end + + # the rest of the checks apply to mirrors as well f.mirrors.each do |m| mirror = m.values_at :url urls << (mirror.to_s rescue nil) @@ -236,14 +244,6 @@ def audit_formula_urls f end end - # Check GNU urls - # FIXME only check primary URLs, not mirrors - # urls.each do |p| - # if p =~ %r[^(https?|ftp)://(.+)/gnu/] - # problems << " * \"ftpmirror.gnu.org\" is preferred for GNU software." - # end - # end - return problems end |
