NetBSD Problem Report #25390
Received: (qmail 17492 invoked by uid 605); 29 Apr 2004 15:12:51 -0000
Message-Id: <20040429151247.A36F211156@narn.netbsd.org>
Date: Thu, 29 Apr 2004 15:12:47 +0000 (UTC)
From: krille@users.sf.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: krille@users.sf.net
To: gnats-bugs@gnats.NetBSD.org
Subject: Place of binary packages not in sync between bsd.pkg.mk and genreadme.awk
X-Send-Pr-Version: www-1.0
>Number: 25390
>Category: pkg
>Synopsis: Place of binary packages not in sync between bsd.pkg.mk and genreadme.awk
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: dmcmahill
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 29 15:13:00 +0000 2004
>Closed-Date: Sun Jun 05 15:31:42 +0000 2005
>Last-Modified: Sun Jun 05 15:31:42 +0000 2005
>Originator: Christian Hattemer
>Release: 1.6.2
>Organization:
>Environment:
NetBSD webster 1.6.2_STABLE NetBSD 1.6.2_STABLE (WEBSTER) #1: Wed Apr 28 18:20:03 CEST 2004 krille@webster:/usr/src/sys/arch/i386/compile/WEBSTER i386
>Description:
When the packages directory resides outside of /usr/pkgsrc (because you always think "Hm, there were files I still needed" *after* deleting the directory) bsd.pkg.mk (which puts the packages into the packages directory during make package) and genreadme.awk (which creates the README.html files that should list the available packages) are not in sync.
This means that no packages are listed in README.html files, even if they are available, because genreadme.awk doesn't see them.
I have PACKAGES?=/usr/local/packages/${OS_VERSION}/${MACHINE_ARCH}
this seems the best way because you only need to fix genreadme.awk then.
>How-To-Repeat:
Set $PACKAGES to a directory outside of /usr/pkgsrc
create some binary packages
create README.html
see that no binary packages are listed
>Fix:
This patch will hack genreadme.awk to find the binary packages again.
Of course this is no real solution to the problem.
--- mk/scripts/genreadme.awk Thu Sep 11 05:39:48 2003
+++ /home/krille/genreadme.awk Wed Mar 24 14:36:31 2004
@@ -343,8 +343,8 @@
vul="(no vulnerabilities known)";
}
}
-
- if (MULTIARCH == "no"){
+# Hack broken MULTIARCH handling (not in sync with bsd.pkg.mk)
+ if (1){
cmd="ls -1 "PACKAGES "/" PKGREPOSITORYSUBDIR "/" wildcard[toppkg] PKG_SUFX " 2>/dev/null";
if (debug) {
printf("Checking for binary package with %s\n",
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->dmcmahill
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sat, 19 Mar 2005 02:05:25 +0000
Responsible-Changed-Why:
dmcmahill created genreadme.awk.
From: Dan McMahill <dmcmahill@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/25390 CVS commit: pkgsrc
Date: Tue, 17 May 2005 21:46:59 +0000 (UTC)
Module Name: pkgsrc
Committed By: dmcmahill
Date: Tue May 17 21:46:59 UTC 2005
Modified Files:
pkgsrc: Makefile
pkgsrc/mk: bsd.pkg.mk
pkgsrc/mk/scripts: genreadme.awk mkreadme
Added Files:
pkgsrc/mk/scripts: binpkg-cache
Log Message:
Rework the README.html generation code. Major changes are:
- completely redo the code which decides on the machine architecture,
operating system, and operating system version for the binary packages.
The old way just used to directory names to take a guess. The new
way creates a cache file containing meta-data for all the binary packages
in each "All" directory. This cache file is consulted when generating
the lists of available binary packages. The meta-data is obtained with
pkg_info so it should always be correct even if you do something silly
like mix OS_VERSION or MACHINE_ARCH packages up in the same directory.
Among the benefits are: works when PACKAGES is not $PKGSRC/packages,
works with a more or less arbitrary subdirectory structure, works
when there are subdirectories for multiple operating systems.
This portion of the fix should address PR25390.
The cache files are only updated when the contents of an "All" directory
changes or if the cache file format changes. There is some room for
improving the updating of the cache files, but its not too bad the way
it is.
- fix up some of the awk code so that generadme.awk works with Solaris
nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems).
- remove some "if ! foo" shell constructs to increase portability.
- be more consistent with what variables get passed to mkreadme from
make and which ones are determined automatically. Mostly this meant
moving stuff into mkreadme to make it easier to run it standalone.
To generate a diff of this commit:
cvs rdiff -r1.70 -r1.71 pkgsrc/Makefile
cvs rdiff -r1.1667 -r1.1668 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/scripts/binpkg-cache
cvs rdiff -r1.12 -r1.13 pkgsrc/mk/scripts/genreadme.awk
cvs rdiff -r1.4 -r1.5 pkgsrc/mk/scripts/mkreadme
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: dmcmahill@netbsd.org
State-Changed-When: Tue, 17 May 2005 21:48:21 +0000
State-Changed-Why:
I just checked in some changes to pkgsrc/Makefile, pkgsrc/bsd.pkg.mk, and pkgsrc/mk/scripts/
which should fix this problem robustly. Please let me know if its better for you.
From: Christian Hattemer <c.hattemer@arcor.de>
To: Dan McMahill <dmcmahill@netbsd.org>
Cc: pkgsrc-bugs@netbsd.org
Subject: Re: pkg/25390
Date: Thu, 19 May 2005 19:21:46 +0200
Hello Dan
On 19.05.05, you wrote:
>> Perhaps the note that the file is up to date shouldn't appear when it
>> has just been created before. Also, the ouput of this stage could look
>> like the output of the previous cache file stage.
>
> done.
Fine.
Maybe it wasn't clear, but additionally to removing the "file updated" note
I ment to change "Creating master cache file" to "Missing master cache
file. ... will be generated." to match the wording of the first stage. Or
the other way round. But it's not really an issue. Change it or leave it at
your option.
Please also reset the feedback state in the PR.
Bye, Chris
State-Changed-From-To: feedback->closed
State-Changed-By: dmcmahill@netbsd.org
State-Changed-When: Sun, 05 Jun 2005 15:31:42 +0000
State-Changed-Why:
readme generation changed to not hard code so many (often bad)
assumptions.
>Unformatted:
(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.