On Tue, Jun 21, 2011 at 02:37:09PM +0300, Antti Harri wrote:
> 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
Well, if you're going to use sed anyways:

sed -ne '/^installpath = */s///p' /etc/pkg.conf

Reply via email to