NetBSD Problem Report #29848

From riz@boogers.sf.ca.us  Thu Mar 31 14:47:45 2005
Return-Path: <riz@boogers.sf.ca.us>
Received: from boogers.sf.ca.us (adsl-66-124-71-70.dsl.sntc01.pacbell.net [66.124.71.70])
	by narn.netbsd.org (Postfix) with ESMTP id EEF7A63B11A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 31 Mar 2005 14:47:44 +0000 (UTC)
Message-Id: <200503311447.j2VElivR017608@boogers.sf.ca.us>
Date: Thu, 31 Mar 2005 06:47:44 -0800 (PST)
From: riz@netbsd.org
Reply-To: riz@netbsd.org
To: gnats-bugs@netbsd.org
Subject: pkgtools/pkglint doesn't handle some PLIST stuff correctly
X-Send-Pr-Version: 3.95

>Number:         29848
>Category:       pkg
>Synopsis:       pkglint PLIST checking is a little out of date
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    riz
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 31 14:48:00 +0000 2005
>Closed-Date:    Thu Apr 07 18:34:50 +0000 2005
>Last-Modified:  Thu Apr 07 18:34:50 +0000 2005
>Originator:     Jeff Rizzo
>Release:        NetBSD 2.0_STABLE
>Organization:
>Environment:
System: NetBSD boogers.sf.ca.us 2.0_STABLE NetBSD 2.0_STABLE (TYAN251X.MP) #0: Thu Mar 17 12:49:20 PST 2005 riz@lychee.tastylime.net:/home/riz/buildobj/usr/src/sys/arch/i386/compile/TYAN251X.MP i386
Architecture: i386
Machine: i386
>Description:
	pkglint warns about PLIST situations that are not necessarily
	a problem.
>How-To-Repeat:
	Run pkglint on a package that uses the default PLIST_SRC handling,
	but doesn't set PLIST_SRC itself, or have PLIST or PLIST-mi.
>Fix:
	Should be just a few lines of perl;  I came up with a workaround
	for my specific issue, and wiz suggested I "modernize" the
	PLIST stuff.  (PLIST-mi, for example, is no longer used) This
	PR is here to remind me to do it soon.  :)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->riz
Responsible-Changed-By: riz@netbsd.org
Responsible-Changed-When: Thu, 31 Mar 2005 14:48:59 +0000
Responsible-Changed-Why:
I'll take this one, at the suggestion of wiz.


From: Jeff Rizzo <riz@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/29848
Date: Wed, 6 Apr 2005 13:20:05 -0700

 This is my proposed fix:

 Index: Makefile
 ===================================================================
 RCS file: /usr/mirror/main/pkgsrc/pkgtools/pkglint/Makefile,v
 retrieving revision 1.226
 diff -u -r1.226 Makefile
 --- Makefile	4 Apr 2005 11:04:33 -0000	1.226
 +++ Makefile	6 Apr 2005 20:03:52 -0000
 @@ -1,7 +1,7 @@
  # $NetBSD: Makefile,v 1.226 2005/04/04 11:04:33 abs Exp $
  #

 -DISTNAME=	pkglint-4.10
 +DISTNAME=	pkglint-4.11
  CATEGORIES=	pkgtools devel
  MASTER_SITES=	# empty
  DISTFILES=	# empty
 Index: files/pkglint.pl
 ===================================================================
 RCS file: /usr/mirror/main/pkgsrc/pkgtools/pkglint/files/pkglint.pl,v
 retrieving revision 1.136
 diff -u -r1.136 pkglint.pl
 --- files/pkglint.pl	28 Mar 2005 02:16:55 -0000	1.136
 +++ files/pkglint.pl	6 Apr 2005 20:03:52 -0000
 @@ -299,6 +299,7 @@
  my $scriptdir		= "scripts";
  my %cmdnames		= ();
  my $seen_PLIST_SRC	= false;
 +my $seen_PLIST_SUBST	= false;
  my $seen_NO_PKG_REGISTER= false;
  my $seen_NO_CHECKSUM	= false;
  my $seen_USE_PKGLOCALEDIR = false;
 @@ -638,10 +639,11 @@
  		log_warning("$opt_packagedir/scripts", NO_LINE_NUMBER, "this directory and its contents are deprecated! Please call the script(s) explicitly from the corresponding target(s) in the pkg's Makefile.");
  	}
  	if (! -f "$opt_packagedir/$pkgdir/PLIST"
 -	    and ! -f "$opt_packagedir/$pkgdir/PLIST-mi"
 +	    and ! -f "$opt_packagedir/$pkgdir/PLIST.common"
  	    and ! $seen_PLIST_SRC
 +	    and ! $seen_PLIST_SUBST
  	    and ! $seen_NO_PKG_REGISTER ) {
 -		log_warning(NO_FILE, NO_LINE_NUMBER, "no PLIST or PLIST-mi, and PLIST_SRC and NO_PKG_REGISTER unset. Are you sure PLIST handling is ok?");
 +		log_warning(NO_FILE, NO_LINE_NUMBER, "no PLIST or PLIST.common, and PLIST_SRC, PLIST_SUBST and NO_PKG_REGISTER unset. Are you sure PLIST handling is ok?");
  	}
  	if ($opt_committer) {
  		foreach my $wrkdir (<$opt_packagedir/work*>) {
 @@ -1287,6 +1289,10 @@
  	if ($whole =~ /\nPLIST_SRC/) {
  		$seen_PLIST_SRC = true;
  	}
 +	log_info(NO_FILE, NO_LINE_NUMBER, "checking for PLIST_SUBST.");
 +	if ($whole =~ /\nPLIST_SUBST/) {
 +		$seen_PLIST_SUBST = true;
 +	}
  	log_info(NO_FILE, NO_LINE_NUMBER, "checking for NO_PKG_REGISTER.");
  	if ($whole =~ /\nNO_PKG_REGISTER/) {
  		$seen_NO_PKG_REGISTER = true;

State-Changed-From-To: open->analyzed
State-Changed-By: riz@netbsd.org
State-Changed-When: Wed, 06 Apr 2005 20:26:59 +0000
State-Changed-Why:
Proposed fix has been attached.


State-Changed-From-To: analyzed->closed
State-Changed-By: riz@netbsd.org
State-Changed-When: Thu, 07 Apr 2005 18:34:50 +0000
State-Changed-Why:
Fix has been committed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.