brew-audit - use preferred debian mirror
This commit is contained in:
parent
0305ee47a7
commit
20e2844df7
@ -124,9 +124,14 @@ end
|
||||
def audit_formula_urls f
|
||||
problems = []
|
||||
|
||||
# To do:
|
||||
# Grab URLs out of patches as well
|
||||
# urls = ((f.patches rescue []) || [])
|
||||
|
||||
urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?}
|
||||
|
||||
# Check SourceForge urls
|
||||
[(f.url rescue nil), (f.head rescue nil)].each do |p|
|
||||
next if p.nil?
|
||||
urls.each do |p|
|
||||
# Is it a filedownload (instead of svnroot)
|
||||
next if p =~ %r[/svnroot/]
|
||||
next if p =~ %r[svn\.sourceforge]
|
||||
@ -151,6 +156,15 @@ def audit_formula_urls f
|
||||
end
|
||||
end
|
||||
|
||||
# Check Debian urls
|
||||
urls.each do |p|
|
||||
next unless p =~ %r[/debian/pool/]
|
||||
|
||||
unless p =~ %r[^http://mirrors\.kernel\.org/debian/pool/]
|
||||
problems << " * \"mirrors.kernel.org\" is the preferred mirror for debian software."
|
||||
end
|
||||
end
|
||||
|
||||
return problems
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user