Subject: Re: DESTDIR and pkgsrc (was Re: Problems with pkg db under 1.6.2_STABLE?)
To: Christopher W. Richardson <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 06/10/2004 11:14:52
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

 Jeremy C. Reed

 	  	 	 technical support & remote administration