Subject: Re: Adding DESTDIR support to pkg_add
To: None <tech-pkg@netbsd.org>
From: None <joerg@britannica.bec.de>
List: tech-pkg
Date: 01/09/2006 15:37:12
On Mon, Jan 09, 2006 at 03:23:53PM +0100, Hubert Feyrer wrote:
> On Mon, 9 Jan 2006 joerg@britannica.bec.de wrote:
> >(b) Any temporary storage should be affected via DESTDIR as well IMO,
> >e.g. DESTDIR/var/tmp be used. That's important for install media as
> >well.
> 
> I guess that' can be implemented via the PKG_TMPDIR variable. From 
> pkg_add(1):

I'd expect preinstall scripts need and want access to the staging
directory, so if you want to support them, it would be necessary to put
the stage directory below DESTDIR. Documentation has to be modified of
course :-)

> >(c) If -I was not specified, the scripts have to be run chrooted. In the
> >longer run, we should add a flag for this to allow a bypass for "safe"
> >scripts, but that wouldn't be the general case I think.
> 
> Yumm... :-)
> (I guess this is where it gets hairy :-)

Yes, but I think it would be needed for syspkg as well, e.g. you have a
basic environment which doesn't have any scripts and latter packages can
use them.

Joerg