On Tuesday 21 June 2011 13:45:44 Jan Stary wrote:
> On Jun 21 08:44:59, Antoine Jacoutot wrote:
> > On Tue, 21 Jun 2011, Jan Stary wrote:
> > > # pkg_a -i findutils
> > > findutils-4.4.2|***** | 98%
> > > findutils-4.4.2: ok
> > >
> > > So, findutils-4.4.2 *is* in $PKG_PATH.
> >
> > We don't know, you didn't provide your PKG_PATH.
> >
> > > Why is it that pkg_add sees the required package in $PKG_PATH
> > > (and installs it), yet the port build does not?
> >
> > pkg_add(1) also uses /etc/pkg.conf.
>
> Ah, that's right, pkg.conf specifies an installpath,
> which is not PKG_PATH; so findutils is indeed not in $PKG_PATH.
> Thanks, and sorry for the confusion.
>
>       Jan

I use this in my .profile files, maybe it'll be useful to others too:

local _test=$(grep "^installpath =" /etc/pkg.conf | cut -f 2 -d '=' | sed -e 
's/ //')
test -n _test && export PKG_PATH=$_test

It sets PKG_PATH on login to the same value that pkg.conf has.

-- 
Antti Harri

Reply via email to