From f6103d78ce0298c882500bb8478def87e6b18ba3 Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 12 Feb 2005 21:34:47 +0000 Subject: Pkglint now checks that the file entries in PLIST files are correctly sorted. Welcome to 4.03. --- pkgtools/pkglint/Makefile | 4 ++-- pkgtools/pkglint/files/pkglint.pl | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'pkgtools') 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 , @@ -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."); } -- cgit v1.2.3