Subject: Re: pkg/36662: pkgtools/pkg_install's audit_packages appears to be platform-specific
To: None <joerg@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,>
From: Stuart Shelton <srcshelton@gmail.com>
List: pkgsrc-bugs
Date: 07/23/2007 11:15:05
The following reply was made to PR pkg/36662; it has been noted by GNATS.
From: "Stuart Shelton" <srcshelton@gmail.com>
To: gnats-bugs@netbsd.org
Cc: joerg@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36662: pkgtools/pkg_install's audit_packages appears to be platform-specific
Date: Mon, 23 Jul 2007 12:14:20 +0100
Additionally, I have a peculiar problem with pkg_install *only*
When I go to "bmake" any target (other than clean) for it, I get:
netbsd@octane ~/pkgtools/pkg_install # bmake patch
=> Required installed package digest>=20010302: digest-20070703 found
===> _flavor-check-vulnerable [pkg_install-20070720] ===> Checking for
vulnerabilities in pkg_install-20070720
===> depends-message [pkg_install-20070720] ===> Installing
dependencies for pkg_install-20070720
/usr/bsd/src/mk/flavor/pkg/resolve-dependencies[2]:
PKG_DBDIR=/usr/bsd/var/db/pkg: not found
ERROR: [resolve-dependencies] A package matching ``digest>=20010302'' should
ERROR: be installed, but one cannot be found. Perhaps there is a
ERROR: stale work directory for ../../pkgtools/digest?
*** Error code 1
Stop.
bmake: stopped in /usr/bsd/src/pkgtools/pkg_install
/usr/bsd/var/db/pkg is the correct directory, there is no stale work
directory for digest, and (as the first line shows) the digest package
is clearly installed.
As I said, this affects no other package...
(It looks as if the shell is trying to interpret the PKG_DBDIR
variable as a command - but the strange thing is that after a
seemingly variable number of attempts, with or without cleans and with
different targets, it will eventually work.)
On 23/07/07, Stuart Shelton <srcshelton@gmail.com> wrote:
> Still two outstanding issues:
>
> * <err.h> is still being unconditionally included. This is wrong. It
> should be replaced with a conditional include from nbcompat/, as with
> sha2.h a few lines below.
>
> * There's something screwey in nbcompat/err.h, which breaks IRIX'
> cdefs.h - and cdefs.h must be included in order to get the __P macro.
> So <sys/cdefs.h> must be included *before* <nbcompat/err.h>
>
> Patch:
>
> --- audit-packages/audit-packages.c.dist 2007-07-23
> 11:16:00.420162080 +0100
> +++ audit-packages/audit-packages.c 2007-07-23 11:49:27.043021280 +0100
> @@ -44,7 +44,12 @@
> #ifdef HAVE_INTTYPES_H
> #include <stdint.h>
> #endif
> +#include <sys/cdefs.h>
> +#ifdef PKGSRC
> +#include <nbcompat/err.h>
> +#else
> #include <err.h>
> +#endif
> #include <string.h>
> #include <sys/types.h>
> #include <sys/stat.h>
>
> Cheers,
>
> Stuart
>
>
> On 21/07/07, Adrian Portelli <adrianp@stindustries.net> wrote:
> > The following reply was made to PR pkg/36662; it has been noted by GNATS.
> >
> > From: Adrian Portelli <adrianp@stindustries.net>
> > To: gnats-bugs@NetBSD.org
> > Cc:
> > Subject: Re: pkg/36662: pkgtools/pkg_install's audit_packages appears to be
> > platform-specific
> > Date: Sat, 21 Jul 2007 16:04:07 +0100
> >
> > Hi,
> >
> > Could you please do a 'cvs update' to make sure you have all the latest
> > changes and then apply the following patch:
> >
> > http://www.stindustries.net/NetBSD/stuff/pkg_install.diff
> >
> > (cd ${PREFIX} && cat pkg_install.diff | patch -p0)
> >
> > This should fix the remainder of the issues in this PR.
> >
> > thanks,
> >
> > adrian.
> >
> >
>