Subject: Re: pkgtools -- please do not hard code path
To: Jan Danielsson <jan.m.danielsson@gmail.com>
From: Tobias Nygren <tnn@NetBSD.org>
List: pkgsrc-users
Date: 05/13/2007 20:41:28
On Sun, 13 May 2007 19:18:16 +0200
Jan Danielsson <jan.m.danielsson@gmail.com> wrote:

> But one
> application which does not work properly when I install from the binary
> package built in the chroot is lintpkgsrc. When I installed pkglint in
> my "real" system from the binary package, I can no longer run
> lintpkgsrc, since it's hard coded to use /usr/pkgsrc.
> 
>    One solution is to simply link /usr/pkgsrc to /home/pkgsrc/pkgsrc.
> But when I discussed this on IRC, someone pointed out that applications
> which hard code the pkgsrc path during installation aren't being well
> behaved. When I think about it, I agree with that. The pkgsrc path
> should be queried in run-time, IMHO. Or is there a reason not to?
> 

Yes, it should grab PKGSRCDIR from mk.conf. See patch I committed
recently in pkg_rolling-replace. While we're at it, pkg_chk should
use ${PREFIX}/etc/mk.conf instead of /usr/pkg/etc/mk.conf.

-T