On Tue, Jun 16, 2009 at 01:14:01AM +0200, Darren Reed wrote:
> So, in $SRC/pkgdefs/SUNWcsr/postinstall, I can see this:
>
> ...
> cat >> $BASEDIR/var/svc/profile/upgrade <<\_DEL_BIND8
That's a bug.
> ...
> cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<\_IPSECUPGRD
> ...
That too is a bug, though arguably SUNWcsr can't actually be relocated,
therefore it shouldn't be relocatable, and BASEDIR shouldn't be used. I
don't know why core pkgs that couldn't possibly be relocated are
nonetheless relocatable -- I've long thought it most strange.
> Your output suggests that in many places, the two should be
> used together like this:
> $PKG_INSTALL_ROOT/$BASEDIR
Absolutely.
> but...
>
> $ pwd
> $SRC/pkgdefs
> $ grep PKG_INSTALL_ROOT */* | grep BASEDIR | wc -l
> 0
>
> so either there are a lot of very buggy install scripts
> or the way you're describing it isn't quite right.
They're buggy. The ones that say PKG_INSTALL_ROOT but not BASEDIR work
because BASEDIR *always* == "/", but the ones that say BASEDIR but not
PKG_INSTALL_ROOT are most likely broken.
The SVR4 packaging guide leaves no doubt about this:
http://docs.sun.com/app/docs/doc/805-6338/6j5vn5q50?a=view
http://docs.sun.com/app/docs/doc/820-4042/package-2?a=view
Note the CLIENT_BASEDIR variable, that evaluates to
$PKG_INSTALL_ROOT/$BASEDIR (minus duplicated leading slashes).
Nico
--
_______________________________________________
networking-discuss mailing list
[email protected]