diff options
author | wiz <wiz@pkgsrc.org> | 2003-01-24 15:16:31 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2003-01-24 15:16:31 +0000 |
commit | e6eec147e82379a24be5897d37e4510ff8ff2496 (patch) | |
tree | 1d222c21e9a78858f5add947fcf941b7272366e7 | |
parent | 1af04b4e83240a4c394e7b92a298fdacdc87903f (diff) | |
download | pkgsrc-e6eec147e82379a24be5897d37e4510ff8ff2496.tar.gz |
Update to 3.45:
Accept commented out SUBDIRS in category Makefiles, if a comment
with a reason is given.
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index dfe0ba69e68..bcf4999177b 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.149 2003/01/24 15:00:41 atatat Exp $ +# $NetBSD: Makefile,v 1.150 2003/01/24 15:16:31 wiz Exp $ # -DISTNAME= pkglint-3.44 +DISTNAME= pkglint-3.45 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 96888c3755d..5bb32fb282c 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -12,7 +12,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.79 2003/01/15 23:41:32 rh Exp $ +# $NetBSD: pkglint.pl,v 1.80 2003/01/24 15:16:32 wiz Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by Hubert Feyrer <hubertf@netbsd.org>, @@ -1563,19 +1563,19 @@ sub category_check { # get list of dirs to compare against @dirlist=glob("*/"); foreach $i (@dirlist) { - # drop trailing slash and enter into hash - $i =~ s/\/$//; - $hash{$i} = 1; + # drop trailing slash and enter into hash + $i =~ s/\/$//; + $hash{$i} = 1; } # we expect the CVS dir to be here $hash{CVS} = 0; # remove comments foreach $n (split "\n", $contents) { - if ($n =~ /^SUBDIR(\+*)=\s*(\S+)(\s*#.*|\s*)$/) { - $sub = $2; + if ($n =~ /^(#)?SUBDIR(\+*)=\s*(\S+)(\s*#.*|\s*)$/) { + $sub = $3; if ($first == 0) { - if ($1 ne "+") { - &perror("FATAL: use SUBDIR+=, not SUBDIR$1="); + if ($2 ne "+") { + &perror("FATAL: use SUBDIR+=, not SUBDIR$2="); } if ($lastsub ge $sub) { &perror("FATAL: $sub should come before $lastsub"); @@ -1586,10 +1586,13 @@ sub category_check { } $lastsub = $sub; if ($hash{$sub} == 1) { - $hash{$sub} = 0; + $hash{$sub} = 0; } else { - $hash{$sub} = -1; + $hash{$sub} = -1; + } + if ($1 eq "#" and not $4 =~ /#\s*\w+/) { + &perror("WARN: $3 commented out without giving a reason"); } } } |