summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/pkglint.pl
diff options
context:
space:
mode:
authorrillig <rillig>2006-07-07 09:45:07 +0000
committerrillig <rillig>2006-07-07 09:45:07 +0000
commit33a8fa380304c00c4428d586dcafc510cb2e3c20 (patch)
treeeafd5c34d06a2c204ef27c2fd24676111195f582 /pkgtools/pkglint/files/pkglint.pl
parentc32bb80fb918d1c112c0bb99c2ab219fc7a7798c (diff)
downloadpkgsrc-33a8fa380304c00c4428d586dcafc510cb2e3c20.tar.gz
In all URLs, insist on the proper spelling of NetBSD.org.
Diffstat (limited to 'pkgtools/pkglint/files/pkglint.pl')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl9
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));