diff options
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 30 |
2 files changed, 23 insertions, 11 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index eac621eb7a1..bfd128e8f53 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.102 2001/06/21 15:15:01 abs Exp $ +# $NetBSD: Makefile,v 1.103 2001/06/21 15:53:54 abs Exp $ # -DISTNAME= pkglint-3.01 +DISTNAME= pkglint-3.02 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index c681783685c..1bd7de79054 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,6 +1,6 @@ #!@PREFIX@/bin/perl -# $NetBSD: lintpkgsrc.pl,v 1.53 2001/06/21 15:15:02 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.54 2001/06/21 15:53:54 abs Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -1009,7 +1009,7 @@ sub scan_pkgsrc_distfiles_vs_distinfo my($pkgsrcdir, $pkgdistdir, $check_unref, $check_distinfo) = @_; my($cat, @categories, $pkgdir); my(%distfiles, %sumfiles, @distwarn, $file, $numpkg); - my(@bad_distfiles); + my(%bad_distfiles); @categories = &list_pkgsrc_categories($pkgsrcdir); @@ -1057,7 +1057,7 @@ sub scan_pkgsrc_distfiles_vs_distinfo { my($dist); if (!defined($dist = $distfiles{$file})) - { push(@bad_distfiles, $file); } + { $bad_distfiles{$file} = 1; } else { if ($dist->{'sum'} ne 'IGNORE') @@ -1065,11 +1065,11 @@ sub scan_pkgsrc_distfiles_vs_distinfo } } - if ($check_unref && @bad_distfiles) + if ($check_unref && %bad_distfiles) { - &verbose(scalar(@bad_distfiles), + &verbose(scalar(keys %bad_distfiles), " unreferenced file(s) in '$pkgdistdir':\n"); - print join("\n", sort @bad_distfiles), "\n"; + print join("\n", sort keys %bad_distfiles), "\n"; } if ($check_distinfo) @@ -1081,6 +1081,18 @@ sub scan_pkgsrc_distfiles_vs_distinfo &safe_chdir("$pkgdistdir"); foreach $sum (keys %sumfiles) { + if ($sum eq 'Size') + { + foreach (@{$sumfiles{$sum}}) + { + if (! -f $_ || -S $_ != $distfiles{$_}{'sum'}) + { + print $_, " (Size)\n"; + $bad_distfiles{$_} = 1; + } + } + next; + } open(DIGEST, "digest $sum @{$sumfiles{$sum}}|") || &fail("Run digest: $!"); while (<DIGEST>) @@ -1089,15 +1101,15 @@ sub scan_pkgsrc_distfiles_vs_distinfo { if ($distfiles{$1}{'sum'} ne $2) { - print $1, "\n"; - push(@bad_distfiles, $1); + print $1, " ($sum)\n"; + $bad_distfiles{$1} = 1; } } } close(DIGEST); } } - @bad_distfiles; + (sort keys %bad_distfiles); } # Remember to update manual page when modifying option list |