diff options
author | rillig <rillig@pkgsrc.org> | 2006-07-07 09:45:07 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-07-07 09:45:07 +0000 |
commit | bd85a5d1477bbf7a6a797d9ee6d11eb75b0ff80f (patch) | |
tree | eafd5c34d06a2c204ef27c2fd24676111195f582 | |
parent | 4f6f0572614025cab623f2afed9c8e1c963c4019 (diff) | |
download | pkgsrc-bd85a5d1477bbf7a6a797d9ee6d11eb75b0ff80f.tar.gz |
In all URLs, insist on the proper spelling of NetBSD.org.
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index f2d9cfa3790..145f6c68ba9 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.638 2006/07/06 22:06:15 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.639 2006/07/07 09:45:07 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4825,9 +4825,14 @@ sub checkline_mk_vartype_basic($$$$$$$$) { } elsif ($value =~ regex_unresolved) { # No further checks - } elsif ($value =~ qr"^(?:http://|ftp://|gopher://)[-0-9A-Za-z.]+(?::\d+)?/([-%&+,./0-9:=?\@A-Z_a-z~]|\\#)*?$") { + } elsif ($value =~ qr"^(https?|ftp|gopher)://([-0-9A-Za-z.]+)(?::(\d+))?/([-%&+,./0-9:=?\@A-Z_a-z~]|\\#)*$") { + my ($proto, $host, $port, $path) = ($1, $2, $3, $4); my $sites = get_dist_sites(); + if ($host =~ qr"\.NetBSD\.org$"i && $host !~ qr"\.NetBSD\.org$") { + $line->log_warning("Please write NetBSD.org instead of ${host}."); + } + foreach my $site (keys(%{$sites})) { if (index($value, $site) == 0) { my $subdir = substr($value, length($site)); |