From a17567376914a545560f4f0e6304b9b019e6d742 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 24 Jul 2003 07:54:45 +0000 Subject: [PATCH] Check if HOMEPAGE URL has a trailing slash if it only consists of a hostname. From Ben Collver in PR 22215. Bump to 3.57. --- pkgtools/pkglint/Makefile | 4 ++-- pkgtools/pkglint/files/pkglint.pl | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 476b2f533fd2..e60dbb8b45ea 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.163 2003/07/17 22:52:18 grant Exp $ +# $NetBSD: Makefile,v 1.164 2003/07/24 07:54:45 wiz Exp $ # -DISTNAME= pkglint-3.56 +DISTNAME= pkglint-3.57 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools devel MASTER_SITES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index e63da83aab84..c0f46d0fd723 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.89 2003/07/14 15:36:29 martti Exp $ +# $NetBSD: pkglint.pl,v 1.90 2003/07/24 07:54:46 wiz Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by Hubert Feyrer , @@ -1225,10 +1225,18 @@ EOF &checkorder('MAINTAINER', $tmp, @tocheck); - # warnings for missing HOMEPAGE + # warnings for missing or incorrect HOMEPAGE $tmp = "\n" . $tmp; - if ($tmp !~ /\nHOMEPAGE=/) { + if ($tmp !~ /\nHOMEPAGE[+?]?=[ \t]*([^\n]*)\n/ || $1 =~ /^[ \t]*$/) { &perror("WARN: please add HOMEPAGE if the package has one."); + } else { + $i = $1; + if ($i =~ m#^\w+://#) { + if ($i !~ m#^\w+://[^\n/]+/#) { + &perror("WARN: URL \"$i\" does not ". + "end with \"/\"."); + } + } } # warnings for missing COMMENT