diff options
author | rillig <rillig@pkgsrc.org> | 2005-02-12 21:34:47 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-02-12 21:34:47 +0000 |
commit | c3bb1af75001cf07d51aa275f5be11ac9a2c84ae (patch) | |
tree | eb11787c60a5533270be8e884124f0e3839f897c /pkgtools | |
parent | 9c892ff247ace61437f4822dcb88d4f33f71f5ba (diff) | |
download | pkgsrc-c3bb1af75001cf07d51aa275f5be11ac9a2c84ae.tar.gz |
Pkglint now checks that the file entries in PLIST files are correctly
sorted. Welcome to 4.03.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 5a1433f83cf..0fdf66c5fa2 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.216 2005/02/12 10:59:20 rillig Exp $ +# $NetBSD: Makefile,v 1.217 2005/02/12 21:34:47 rillig Exp $ # -DISTNAME= pkglint-4.02 +DISTNAME= pkglint-4.03 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index b9cd22c35fb..ab59ce172b0 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.128 2005/02/12 10:59:21 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.129 2005/02/12 21:34:47 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by Hubert Feyrer <hubertf@netbsd.org>, @@ -812,7 +812,7 @@ sub checkfile_MESSAGE($) { sub checkfile_PLIST($) { my ($file) = @_; my ($fname) = ("$opt_packagedir/$file"); - my ($plist, $curdir, $rcsid_seen); + my ($plist, $curdir, $rcsid_seen, $last_file_seen); checkperms($fname); if (!defined($plist = load_file($fname))) { @@ -859,6 +859,15 @@ sub checkfile_PLIST($) { log_error($line->file, $line->lineno, "use of full pathname disallowed."); } + if ($line->text =~ qr"^[\w\d]") { + if (defined($last_file_seen)) { + if ($last_file_seen gt $line->text) { + log_error($line->file, $line->lineno, $line->text." must be sorted before ${last_file_seen}."); + } + } + $last_file_seen = $line->text; + } + if ($line->text =~ /^doc/) { log_error($line->file, $line->lineno, "documentation must be installed under share/doc, not doc."); } |