Hi PKG_INSTALL_ROOT is equivalent to the -R arg to pkgadd, ie it's the root of the system where the package is being installed. BASEDIR is where any relocatable files get installed with respect to the root of the system being worked on
ie say a pkgmap has 1 f none sbin/ls 0555 root sys 3541 12322 1002918510 1 f none /sbin/ls2 0555 root sys 3541 12322 2342423332 with pkginfo BASEDIR=/opt and we call pkgadd -R /a then ls will install in /a/opt/sbin/ls and ls2 will install in /a/sbin/ls2, that is PKG_INSTALL_ROOT will be set to /a, and BASEDIR will get set to /opt, but as second file is absolute ( ie an absolute path was specified ), the basedir is ignored in case of ls2. Enda Nicolas Williams wrote: > On Mon, Jun 15, 2009 at 09:12:02PM +0200, Darren Reed wrote: >> I've filed 6851264. > > Thanks. > >> Nicolas Williams wrote: >>> - IIRC it's incorrect to refer only to $BASEDIR in the pkg scripts -- >>> you need to also use $PKG_INSTALL_ROOT, like so: >>> >>> +rm -f $PKG_INSTALL_ROOT/$BASEDIR/var/tmp/dhcpsvc.tmp >>> +if [ ! -f $PKG_INSTALL_ROOT/$BASEDIR/etc/inet/dhcpsvc.conf ] ; then >>> + touch $PKG_INSTALL_ROOT/$BASEDIR/var/tmp/dhcpsvc.tmp >>> +fi >>> >> Be that as it may, the rest of the package files are >> only using $PKG_INSTALL_ROOT. On top of >> that, use of $PKG_INSTALL_ROOT by itself seems >> quite common. I'm not going to make this change. > > PKG_INSTALL_ROOT evaluates to the root of the image into which the pkg > is being installed. And, IIRC, BASEDIR does not evaluate, in pkg > install/remove context, to PKG_INSTALL_ROOT + '/' + the BASEDIR from the > pkginfo. To not use PKG_INSTALL_ROOT here is a bug. > >>> - Also, it's not clear to me how your fix for 6378850 works. The state >>> of the service isn't checked (as the evaluation says it should be). >> The state of the service is only important in one scenario - pre-SMF >> DHCP server. >> >> This is inferred by the presence of the configuration file. >> >> In every other situation we want to do one thing: nothing. > > This doesn't answer my question, but it doesn't matter: the new > suggested fix in the CR does the right thing and I'm happy. > >> Err, no, but I suspect that I updated the Evaluation ahead of the >> suggested fix. >> And ahead of updating the webrev. >> Please recheck the CR. > > I see it now. > > (Speaking of webrevs, when posting webrevs outside SWAN you should use > webrev -O, which generates references to b.o.o instead of monaco.) > > Nico