Has anyone else noticed the following inconsistency? Some packages have been having problems related to @exec and @unexec statements and the %D sequence. I think this happens because contrary to the pkg_create man page, it appears that %D is expanded for @exec, but not for @unexec. (This seems to be a pkg_delete bug, but I haven't been able to look in the FreeBSD CVS server to figure out if/when @unexec last supported %D).
@exec needs an absolute pathname, and using %D fulfill this requirement. @unexec commands take place in the directory specfied by @cwd, so leaving off %D seems to be the easiest way for @unexec to access paths that were set up by @exec. To use an example from the database package: @cwd /usr ... npdatabase/dbcheck ... @exec ln -sf %D/npdatabase/dbcheck %D/local/etc/rc.d/dbcheck.sh @unexec rm -f local/etc/rc.d/dbcheck.sh When the package is added: - npdatabase/dbcheck is installed as /usr/npdatabase/dbcheck - /usr/npdatabase/dbcheck is linked to /usr/local/etc/rc.d/dbcheck.sh When the package is deleted: - /usr/local/etc/rc.d/dbcheck.sh is removed Both @exec and @unexec could use just absolute pathnames (/usr/local/etc/rc.d/dbcheck.sh), but this would prevent relocation of the package. It's not important at the moment, but package relocation could be used in the future to help generate system disk images on manufacturing stands without disturbing the manufacturing machine's installed software. Regards, Romain Kang Disclaimer: I speak for myself alone, [EMAIL PROTECTED] except when indicated otherwise. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message