From 237c86ada55ac9d8f3901ffaa811c7f4babd77b8 Mon Sep 17 00:00:00 2001 From: wiz Date: Sat, 12 Feb 2000 17:13:53 +0000 Subject: have a bit more clue about md5-files: don't warn if there's no files/md5 but NO_CHECKSUM is set in the Makefile; bump version --- pkgtools/pkglint/Makefile | 4 ++-- pkgtools/pkglint/files/pkglint.pl | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'pkgtools/pkglint') diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index c6aa532646a..2ce315527a7 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.44 2000/02/09 17:41:20 abs Exp $ +# $NetBSD: Makefile,v 1.45 2000/02/12 17:13:53 wiz Exp $ # -DISTNAME= pkglint-2.03 +DISTNAME= pkglint-2.04 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 5198e388bc5..b83ca320b52 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.26 2000/02/05 17:19:06 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.27 2000/02/12 17:13:53 wiz Exp $ # # This version contains some changes necessary for NetBSD packages # done by Hubert Feyrer and @@ -117,6 +117,7 @@ $sharedocused = 0; %manlangs = (); $seen_PLIST_SRC = 0; $seen_NO_PKG_REGISTER = 0; +$seen_NO_CHECKSUM = 0; %predefined = (); foreach $i (split("\n", <) { next if (defined $checker{$i}); push(@checker, $i); $checker{$i} = 'checkmd5'; -} else { - &perror("WARN: no $portdir/files/md5 file. Please run 'make makesum'."); } foreach $i (@checker) { print "OK: checking $i.\n"; @@ -216,6 +215,15 @@ foreach $i (@checker) { } } } +if (-e <$portdir/files/md5> ) { + if ( $seen_NO_CHECKSUM ) { + &perror("WARN: NO_CHECKSUM set, but files/md5 exists. Please remove it."); + } +} else { + if ( ! $seen_NO_CHECKSUM ) { + &perror("WARN: no $portdir/files/md5 file. Please run 'make makesum'."); + } +} if (! -f "$portdir/pkg/PLIST" and ! -f "$portdir/pkg/PLIST-mi" and ! $seen_PLIST_SRC @@ -681,6 +689,10 @@ sub checkmakefile { if ($whole =~ /\nNO_PKG_REGISTER/) { $seen_NO_PKG_REGISTER=1; } + print "OK: checking for NO_CHECKSUM.\n" if ($verbose); + if ($whole =~ /\nNO_CHECKSUM/) { + $seen_NO_CHECKSUM=1; + } # # whole file: direct use of command names -- cgit v1.2.3