Subject: Re: DESTDIR and pkgsrc (was Re: Problems with pkg db under 1.6.2_STABLE?)
To: Jeremy C. Reed <>
From: Alistair Crooks <>
List: tech-pkg
Date: 06/11/2004 15:08:30
On Thu, Jun 10, 2004 at 11:14:52AM -0700, Jeremy C. Reed wrote:
> On 10 Jun 2004, Christopher W. Richardson wrote:
> > OK, that let me sort things out. The short answer seems to be
> > that it's registering in /usr/build/var/db/pkg instead of in
> > /var/db/pkg.  As seen in previous posts, I don't have PKG_DBDIR
> > set to anything either in the environment of in /etc/mk.conf.
> > DESTDIR is set to /usr/build in /etc/mk.conf, but I don't recall
> > changing this recently (removing that line from /etc/mk.conf
> > fixes things).
> It is not a bug. I guess maybe it could be documented better.
> Have a look at pkgsrc/mk/ at PKG_DBDIR:
> PKG_DBDIR?=               ${DESTDIR}/var/db/pkg
> > Regardless, it seems odd that having DESTDIR set effectively sets
> > PKG_DBDIR, but the actually binaries are installed in default
> > LOCALBASE, doesn't it?
> pkgsrc/mk/ also sets
> LOCALBASE?=             ${DESTDIR}/usr/pkg
> But your LOCALBASE was probably already defined earlier, so it was not
> redefined.

Yes, the DESTDIR stuff needs to get ripped out - it's never quite done
what was expected, is problematic, and seems to violate the POLS.