Thu Dec 17 16:17:45 2020 UTC ()
pkgtools/lintpkgsrc: update to 4.96

Changes since 4.95:

Do not complain about "Bogus: ${_SVN_PKGREVISION:...}" that are
generated by wip/mk/*-package.mk.  Using PKGREVISION to track the
current date of the package is the wrong approach; PKGVERSION_NOREV
should be used instead.  Anyway, this is nothing the average pkgsrc user
should be worried about, so shut up the warning for now.

https://mail-index.netbsd.org/pkgsrc-users/2020/12/16/msg032884.html


(rillig)
diff -r1.34 -r1.35 pkgsrc/pkgtools/lintpkgsrc/Makefile
diff -r1.19 -r1.20 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl

cvs diff -r1.34 -r1.35 pkgsrc/pkgtools/lintpkgsrc/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/lintpkgsrc/Makefile 2020/08/31 18:10:58 1.34
+++ pkgsrc/pkgtools/lintpkgsrc/Makefile 2020/12/17 16:17:44 1.35
@@ -1,17 +1,16 @@ @@ -1,17 +1,16 @@
1# $NetBSD: Makefile,v 1.34 2020/08/31 18:10:58 wiz Exp $ 1# $NetBSD: Makefile,v 1.35 2020/12/17 16:17:44 rillig Exp $
2 2
3PKGNAME= lintpkgsrc-4.95 3PKGNAME= lintpkgsrc-4.96
4PKGREVISION= 1 
5CATEGORIES= pkgtools 4CATEGORIES= pkgtools
6 5
7MAINTAINER= pkgsrc-users@NetBSD.org 6MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= https://www.NetBSD.org/Documentation/pkgsrc/ 7HOMEPAGE= https://www.NetBSD.org/Documentation/pkgsrc/
9COMMENT= Sanity checks on the complete pkgsrc tree 8COMMENT= Sanity checks on the complete pkgsrc tree
10 9
11DEPENDS+= digest>=20010101:../../pkgtools/digest 10DEPENDS+= digest>=20010101:../../pkgtools/digest
12CONFLICTS+= pkglint<4.82 11CONFLICTS+= pkglint<4.82
13 12
14USE_TOOLS+= perl:run 13USE_TOOLS+= perl:run
15 14
16WRKSRC= ${WRKDIR} 15WRKSRC= ${WRKDIR}
17NO_BUILD= yes 16NO_BUILD= yes

cvs diff -r1.19 -r1.20 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl (expand / switch to unified diff)

--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl 2020/12/17 16:08:44 1.19
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl 2020/12/17 16:17:45 1.20
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@PERL5@ 1#!@PERL5@
2 2
3# $NetBSD: lintpkgsrc.pl,v 1.19 2020/12/17 16:08:44 rillig Exp $ 3# $NetBSD: lintpkgsrc.pl,v 1.20 2020/12/17 16:17:45 rillig Exp $
4 4
5# Written by David Brownlee <abs@netbsd.org>. 5# Written by David Brownlee <abs@netbsd.org>.
6# 6#
7# Caveats: 7# Caveats:
8# The 'Makefile parsing' algorithm used to obtain package versions and 8# The 'Makefile parsing' algorithm used to obtain package versions and
9# DEPENDS information is geared towards speed rather than perfection, 9# DEPENDS information is geared towards speed rather than perfection,
10# though it has gotten somewhat better over time, it only parses the 10# though it has gotten somewhat better over time, it only parses the
11# simpler Makefile conditionals. 11# simpler Makefile conditionals.
12# 12#
13# TODO: Handle fun DEPENDS like avifile-devel with 13# TODO: Handle fun DEPENDS like avifile-devel with
14# {qt2-designer>=2.2.4,qt2-designer-kde>=2.3.1nb1} 14# {qt2-designer>=2.2.4,qt2-designer-kde>=2.3.1nb1}
15 15
16$^W = 1; 16$^W = 1;
@@ -986,27 +986,30 @@ sub parse_makefile_pkgsrc($) { @@ -986,27 +986,30 @@ sub parse_makefile_pkgsrc($) {
986 } 986 }
987 } 987 }
988 988
989 if ( defined $pkgname ) { 989 if ( defined $pkgname ) {
990 if ( $pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver ) { 990 if ( $pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver ) {
991 $pkgname = "pkg_install-$pkg_installver"; 991 $pkgname = "pkg_install-$pkg_installver";
992 } 992 }
993 993
994 $pkgname = canonicalize_pkgname($pkgname); 994 $pkgname = canonicalize_pkgname($pkgname);
995 995
996 if ( defined $vars->{PKGREVISION} 996 if ( defined $vars->{PKGREVISION}
997 and not $vars->{PKGREVISION} =~ /^\s*$/ ) 997 and not $vars->{PKGREVISION} =~ /^\s*$/ )
998 { 998 {
999 if ( $vars->{PKGREVISION} =~ /\D/ ) { 999 if ( $vars->{PKGREVISION} =~ /^\$\{(_(CVS|GIT|HG|SVN)_PKGVERSION):.*\}$/ ) {
 1000 # See wip/mk/*-package.mk.
 1001 }
 1002 elsif ( $vars->{PKGREVISION} =~ /\D/ ) {
1000 print 1003 print
1001 "\nBogus: PKGREVISION $vars->{PKGREVISION} (from $file)\n"; 1004 "\nBogus: PKGREVISION $vars->{PKGREVISION} (from $file)\n";
1002 1005
1003 } 1006 }
1004 elsif ( $vars->{PKGREVISION} ) { 1007 elsif ( $vars->{PKGREVISION} ) {
1005 $pkgname .= "nb"; 1008 $pkgname .= "nb";
1006 $pkgname .= $vars->{PKGREVISION}; 1009 $pkgname .= $vars->{PKGREVISION};
1007 } 1010 }
1008 } 1011 }
1009 1012
1010 if ( $pkgname =~ /\$/ ) { 1013 if ( $pkgname =~ /\$/ ) {
1011 print "\nBogus: $pkgname (from $file)\n"; 1014 print "\nBogus: $pkgname (from $file)\n";
1012 1015