summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-27 20:25:49 +0000
committerrillig <rillig@pkgsrc.org>2005-11-27 20:25:49 +0000
commit4c81669b0be7a7cb64280ad091f8fb7b0a3945cb (patch)
tree760eacadca328f8362526fe0d3c76cbb05494090 /pkgtools
parentd001e9dfc8d0a8c7e3dec370c5b7f490c05db661 (diff)
downloadpkgsrc-4c81669b0be7a7cb64280ad091f8fb7b0a3945cb.tar.gz
Updated pkglint to 4.36.2.
- Improved diagnostics for URLs that are not strictly pkgsrc-compliant, as requested on tech-pkg.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl21
2 files changed, 19 insertions, 6 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index fcd64654d68..06e4d436ef5 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.310 2005/11/24 21:51:10 rillig Exp $
+# $NetBSD: Makefile,v 1.311 2005/11/27 20:25:49 rillig Exp $
#
-DISTNAME= pkglint-4.46.1
+DISTNAME= pkglint-4.46.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index a60ceb4339d..b91d83c7462 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.386 2005/11/27 20:12:44 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.387 2005/11/27 20:25:49 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -1977,7 +1977,10 @@ sub checkline_basic_vartype($$$$$) {
}
} elsif ($type eq "URL") {
- if ($value =~ qr"\$\{(MASTER_SITE_.*):=(.*)\}$") {
+ if ($value eq "" && defined($comment) && $comment =~ qr"^#") {
+ # Ok
+
+ } elsif ($value =~ qr"\$\{(MASTER_SITE_.*):=(.*)\}$") {
my ($name, $subdir) = ($1, $2);
if (!exists(get_dist_sites_names()->{$name})) {
@@ -2001,8 +2004,18 @@ sub checkline_basic_vartype($$$$$) {
}
}
- } elsif ($value eq "" && defined($comment) && $comment =~ qr"^#") {
- # Ok
+ } elsif ($value =~ qr"^([0-9A-Za-z]+)://([^/]+)(.*)$") {
+ my ($scheme, $host, $abs_path) = ($1, $2, $3);
+
+ if ($scheme ne "ftp" && $scheme ne "http") {
+ $line->log_warning("\"${value}\" is not a valid URL. Only http:// and ftp:// URLs are allowed here.");
+
+ } elsif ($abs_path eq "") {
+ $line->log_note("For consistency, please add a trailing slash to \"${value}\".");
+
+ } else {
+ $line->log_warning("\"${value}\" is not a valid URL.");
+ }
} else {
$line->log_warning("\"${value}\" is not a valid URL.");