NetBSD Problem Report #36863

From kre@munnari.OZ.AU  Thu Aug 30 09:48:15 2007
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 8A31163B8B5
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 30 Aug 2007 09:48:15 +0000 (UTC)
Message-Id: <200708300946.l7U9kluI015136@jade.coe.psu.ac.th>
Date: Thu, 30 Aug 2007 16:46:47 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@NetBSD.org
Subject: mk/emulator/netbsd-compat.mk syntax problem on NetBSD 3 ?
X-Send-Pr-Version: 3.95

>Number:         36863
>Category:       pkg
>Synopsis:       mk/emulator/netbsd-compat.mk syntax problem on NetBSD 3 ?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 30 09:50:00 +0000 2007
>Closed-Date:    Fri Aug 31 16:49:05 +0000 2007
>Last-Modified:  Fri Aug 31 16:49:05 +0000 2007
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15  (pkgsrc current within past few hours)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386
Architecture: i386
Machine: i386
>Description:
	Recent changes to the netbsd-compat stuff (and EMUL_DIST maybe)
	have resulted in lintpkgsrc (on a NetBSD 3.0 system)
	generating messages like ...

/usr/pkgsrc/emulators/compat12/Makefile: Cannot locate /usr/pkgsrc/emulators/${DISTNAME:C/-.*//}/emulator.mk in . /usr/pkgsrc/emulators/compat12 /usr/pkgsrc/emulators/compat_netbsd

	Each of the emulators/compat* packages is doing that.

>How-To-Repeat:
	Try lintpkgsrc -p on a NetBSD 3.0 sysyem (I'm using pkg_comp
	with libkver and the original 3.0 sets installed to simulate that)
	and just watch.

>Fix:
	?

	Random guess is that perhaps something is relying upon some
	make behaviour that didn't exist (or work) in NetBSD 3.0

>Release-Note:

>Audit-Trail:
From: "Johnny C. Lam" <jlam@pkgsrc.org>
To: gnats-bugs@NetBSD.org
Cc: pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36863: mk/emulator/netbsd-compat.mk syntax problem on NetBSD 3 ?
Date: Thu, 30 Aug 2007 16:29:55 +0000

 On Thu, Aug 30, 2007 at 09:50:00AM +0000, kre@munnari.OZ.AU wrote:
 > >Description:
 > 	Recent changes to the netbsd-compat stuff (and EMUL_DIST maybe)
 > 	have resulted in lintpkgsrc (on a NetBSD 3.0 system)
 > 	generating messages like ...
 > 
 > /usr/pkgsrc/emulators/compat12/Makefile: Cannot locate /usr/pkgsrc/emulators/${DISTNAME:C/-.*//}/emulator.mk in . /usr/pkgsrc/emulators/compat12 /usr/pkgsrc/emulators/compat_netbsd
 > 
 > 	Each of the emulators/compat* packages is doing that.
 > 
 > >How-To-Repeat:
 > 	Try lintpkgsrc -p on a NetBSD 3.0 sysyem (I'm using pkg_comp
 > 	with libkver and the original 3.0 sets installed to simulate that)
 > 	and just watch.
 > 
 > >Fix:
 > 	?
 > 
 > 	Random guess is that perhaps something is relying upon some
 > 	make behaviour that didn't exist (or work) in NetBSD 3.0

 No, the bug is actually in lintpkgsrc, which has its own makefile
 parser.  I'm loath to change compat_netbsd/Makefile.common just to
 satisfy lintpkgsrc or pkglint (actually, I'm not even sure how to
 rewrite that line so that lintpkgsrc or pkglint can understand it).
 I did it once for the suse32_* packages already, but I wasn't happy
 about doing it then, either.

 I think this PR should be assigned to the pkglint maintainers.

 	Cheers,

 	-- Johnny Lam <jlam@pkgsrc.org>

From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/36863 CVS commit: pkgsrc/emulators
Date: Thu, 30 Aug 2007 16:54:09 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Thu Aug 30 16:54:09 UTC 2007

 Modified Files:
 	pkgsrc/emulators/compat12: Makefile
 	pkgsrc/emulators/compat13: Makefile
 	pkgsrc/emulators/compat14: Makefile
 	pkgsrc/emulators/compat15: Makefile
 	pkgsrc/emulators/compat15-extras: Makefile
 	pkgsrc/emulators/compat16: Makefile
 	pkgsrc/emulators/compat16-extras: Makefile
 	pkgsrc/emulators/compat20: Makefile
 	pkgsrc/emulators/compat20-extras: Makefile
 	pkgsrc/emulators/compat30: Makefile
 	pkgsrc/emulators/compat30-extras: Makefile
 	pkgsrc/emulators/compat_netbsd: Makefile.common

 Log Message:
 Don't rely on differences in the value of DISTNAME that rely on
 "immediate" versus "lazy" evaluation of the value.  Just explicitly
 define a variable (COMPAT_PKG) that holds the value that's needed in
 each of the compat* packages, and use it within Makefile.common.

 This was an attempt to solve PR pkg/36863, but it doesn't look like
 pkglint or lintpkgsrc understand this more straightforward variable
 construction either.


 To generate a diff of this commit:
 cvs rdiff -r1.33 -r1.34 pkgsrc/emulators/compat12/Makefile
 cvs rdiff -r1.29 -r1.30 pkgsrc/emulators/compat13/Makefile
 cvs rdiff -r1.21 -r1.22 pkgsrc/emulators/compat14/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat15/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat15-extras/Makefile
 cvs rdiff -r1.10 -r1.11 pkgsrc/emulators/compat16/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat16-extras/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat20/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat20-extras/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/emulators/compat30/Makefile
 cvs rdiff -r1.2 -r1.3 pkgsrc/emulators/compat30-extras/Makefile
 cvs rdiff -r1.6 -r1.7 pkgsrc/emulators/compat_netbsd/Makefile.common

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jlam@netbsd.org
State-Changed-When: Thu, 30 Aug 2007 16:59:38 +0000
State-Changed-Why:
Actually, it looks like the commit that uses COMPAT_PKG instead of DISTNAME
is understood by lintpkgsrc, although not by pkglint.  Could you test
whether the problem still exists on your machine?  A command-line for the
lintpkgsrc command you executed that generated those errors wasn't provided
in the PR, so I'm not sure how to duplicate the error.  Thanks!


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/36863 (mk/emulator/netbsd-compat.mk syntax problem on NetBSD 3 ?) 
Date: Fri, 31 Aug 2007 18:05:01 +0700

     Date:        Thu, 30 Aug 2007 16:59:40 +0000 (UTC)
     From:        jlam@NetBSD.org
     Message-ID:  <20070830165940.2C78663B8B5@narn.NetBSD.org>

   | Actually, it looks like the commit that uses COMPAT_PKG instead of DISTNAME
   | is understood by lintpkgsrc, although not by pkglint.  Could you test
   | whether the problem still exists on your machine?

 No, gone now.   I had not considered that lintpkgsrc might have its own 
 Makefile parser (though I do now kind of recall something about it, and
 it does make some kind of sense) so I hadn't really considered that it
 might be an issue.   While I had an up to date pkgsrc when I tested this,
 I hadn't upgraded pkglint to its most recent version (my general upgrade
 procedure relies upon lintpkgsrc working to tell me what I am supposed
 to upgrade - when it gives errors I tend to simply put off upgrading
 everything until it is quiet again - and recently there have been a
 whole bunch of changes that have caused errors from lintpkgsrc).

 I upgraded pkglint, and the problem vanished.   Your commits might, or
 might not, have been included when I did the test (I have them now, but
 I actually tested it a while ago, and my repository was still in the process
 of one of its twice daily updates - I suspect I missed the commits in the
 early morning (my timezone) update.

   | A command-line for the lintpkgsrc command you executed that
   | generated those errors wasn't provided

 I didn't really think it was relevant, as almost any execution is going
 to be processing the pkg makefile(s), and it was the makefile parsing that
 was failing, so how lintpkgsrc planned on using the result of all of that
 shouldn't really have been relevant.

 But for completeness, it was

 	pkg_comp chroot lintpkgsrc -p

 (with the output then piped into grep, to get rid of all the messages
 about out of date packages (symlinks) in the various packages/category
 directory, and retain only the stuff in packages/All - but that cannot
 possibly be relevant).

 The pkgcomp_chroot is needed to set up the 3.0 environment (without that
 it would be using some random out of date version of -current).

 This PR can get closed.   Thanks.

 kre

State-Changed-From-To: feedback->closed
State-Changed-By: jlam@netbsd.org
State-Changed-When: Fri, 31 Aug 2007 16:49:05 +0000
State-Changed-Why:
PR author confirms that the compat* packages no longer give lintpkgsrc
trouble.  Thanks for the PR!


>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.