From 5d9d63b31f41bf859069ae2f3e9911bf25a5335b Mon Sep 17 00:00:00 2001 From: seb Date: Thu, 31 Jul 2003 15:13:21 +0000 Subject: Update to version 3.58. Teach pkglint about new rules related to info files handling. - remove old checks of PLIST related to install-info. - emit a FATAL error for "@exec install-info" and similar in PLIST. - emit a FATAL error for inclusion of texinfo.mk. --- pkgtools/pkglint/Makefile | 4 +-- pkgtools/pkglint/files/pkglint.pl | 55 ++++++++------------------------------- 2 files changed, 13 insertions(+), 46 deletions(-) (limited to 'pkgtools/pkglint') diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index e60dbb8b45e..dc749ea92c2 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.164 2003/07/24 07:54:45 wiz Exp $ +# $NetBSD: Makefile,v 1.165 2003/07/31 15:13:21 seb Exp $ # -DISTNAME= pkglint-3.57 +DISTNAME= pkglint-3.58 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools devel MASTER_SITES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index c0f46d0fd72..9775e16934c 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.90 2003/07/24 07:54:46 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.91 2003/07/31 15:13:22 seb Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by Hubert Feyrer , @@ -384,9 +384,7 @@ sub checkmessage { sub checkplist { local($file) = @_; local($curdir) = ($localbase); - local($inforemoveseen, $infoinstallseen, $infoseen) = (0, 0, 0); - local($infobeforeremove, $infoafterinstall) = (0, 0); - local($infooverwrite) = (0); + local($installinfoseen) = 0; local($rcsidseen) = 0; open(IN, "< $portdir/$file") || return 0; @@ -412,14 +410,8 @@ sub checkplist { } elsif ($_ =~ /^\@unexec[ \t]+rmdir/) { &perror("WARN: use \"\@dirrm\" ". "instead of \"\@unexec rmdir\"."); - } elsif ($_ =~ /^\@exec[ \t]+(.*\/)?install-info/) { - $infoinstallseen = $. - } elsif ($_ =~ /^\@exec[ \t]+(.*\/)?\$\{INSTALL_INFO\}/) { - $infoinstallseen = $. - } elsif ($_ =~ /^\@unexec[ \t]+(.*\/)?install-info[ \t]+--delete/) { - $inforemoveseen = $. - } elsif ($_ =~ /^\@unexec[ \t]+(.*\/)?\$\{INSTALL_INFO\}[ \t]+--delete/) { - $inforemoveseen = $. + } elsif ($_ =~ /^\@(un)?exec[ \t]+(.*\/)?(install-info|\$\{INSTALL_INFO\})/) { + $installinfoseen = $. } elsif ($_ =~ /^\@(exec|unexec)/) { if (/ldconfig/ && !/\/usr\/bin\/true/) { @@ -448,17 +440,10 @@ sub checkplist { "disallowed."); } - if ($_ =~ /^info\/.*info(-[0-9]+)?$/) { - $infoseen = $.; - $infoafterinstall++ if ($infoinstallseen); - $infobeforeremove++ if (!$inforemoveseen); - } - if ($_ =~ /^info\/dir$/) { &perror("FATAL: \"info/dir\" should not be listed in ". "$file. use install-info to add/remove ". "an entry."); - $infooverwrite++; } if ($_ =~ /^lib\/locale/) { @@ -496,33 +481,12 @@ sub checkplist { &perror("FATAL: RCS tag \"\$$rcsidstr\$\" must be present ". "in $file as \@comment.") } - - if (!$infoseen) { - close(IN); - return 1; - } - if (!$infoinstallseen) { - if ($infooverwrite) { - &perror("FATAL: \"\@exec install-info\" must be used ". - "to add/delete entries into \"info/dir\"."); - } - &perror("FATAL: \"\@exec install-info\" must be placed ". - "after all the info files."); - } elsif ($infoafterinstall) { - &perror("FATAL: move \"\@exec install-info\" line to make ". - "sure that it is placed after all the info files. ". - "(currently on line $infoinstallseen in $file)"); - } - if (!$inforemoveseen) { - &perror("FATAL: \"\@unexec install-info --delete\" must ". - "be placed before any of the info files listed."); - } elsif ($infobeforeremove) { - &perror("FATAL: move \"\@exec install-info --delete\" ". - "line to make sure ". - "that it is placed before any of the info files. ". - "(currently on line $inforemoveseen in $file)"); + if ($installinfoseen) { + &perror("FATAL: \"\@exec install-info ...\" or \"\@unexec ". + "install-info ...\" is deprecated."); } close(IN); + return 1; } # @@ -653,6 +617,9 @@ sub readmakefile { if ($includefile =~ /\"([^\"]+)\"/) { $includefile = $1; } + if ($includefile =~ /\/mk\/texinfo\.mk/) { + &perror("FATAL: do not include $includefile"); + } if ($includefile =~ /\/mk\/bsd/) { # we don't want to include the whole # bsd.pkg.mk or bsd.prefs.mk files -- cgit v1.2.3