pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Updated pkglint to 4.36.2.
details: https://anonhg.NetBSD.org/pkgsrc/rev/934cf1b1a9a3
branches: trunk
changeset: 503736:934cf1b1a9a3
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Nov 27 20:25:49 2005 +0000
description:
Updated pkglint to 4.36.2.
- Improved diagnostics for URLs that are not strictly pkgsrc-compliant, as
requested on tech-pkg.
diffstat:
pkgtools/pkglint/Makefile | 4 ++--
pkgtools/pkglint/files/pkglint.pl | 21 +++++++++++++++++----
2 files changed, 19 insertions(+), 6 deletions(-)
diffs (58 lines):
diff -r 796655901cef -r 934cf1b1a9a3 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Sun Nov 27 20:12:44 2005 +0000
+++ b/pkgtools/pkglint/Makefile Sun Nov 27 20:25:49 2005 +0000
@@ -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 -r 796655901cef -r 934cf1b1a9a3 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sun Nov 27 20:12:44 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sun Nov 27 20:25:49 2005 +0000
@@ -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 @@
}
} 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 @@
}
}
- } 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.");
Home |
Main Index |
Thread Index |
Old Index