From 9c08e722407f1de5e29ea12e4884ea1417bbdcc6 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 28 Mar 2013 07:00:59 +0000 Subject: [PATCH] Add new _FORCE_POST_PATTERNS which is a pkgng only macro containing a list of command that if found in a @(un)exec pkgng will force to push them in post_deinstallation script. This allows not to hardcode anymore those in the pkgng binary. --- Mk/bsd.pkgng.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk index 5c2f10e54e3b..0e85a9998ffa 100644 --- a/Mk/bsd.pkgng.mk +++ b/Mk/bsd.pkgng.mk @@ -17,6 +17,11 @@ PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall PKGPREUPGRADE?= ${PKGDIR}/pkg-pre-upgrade PKGPOSTUPGRADE?= ${PKGDIR}/pkg-post-upgrade PKGUPGRADE?= ${PKGDIR}/pkg-upgrade +_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ + fonts.dir fonst.scale gtk-update-icon-cache \ + gio-querymodules \ + update-desktop-database update-mime-database + PLIST_REINPLACE:= ${PLIST_REINPLACE:Ndirrmtry} PLIST_REINPLACE:= ${PLIST_REINPLACE:Nstopdaemon} @@ -139,9 +144,9 @@ fake-pkg: @[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0 .endif .if defined(INSTALLS_DEPENDS) - @${PKG_CMD} -d -l -m ${METADIR} -f ${TMPPLIST} + @${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d -l -m ${METADIR} -f ${TMPPLIST} .else - @${PKG_CMD} -l -m ${METADIR} -f ${TMPPLIST} + @${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -l -m ${METADIR} -f ${TMPPLIST} .endif @${RM} -rf ${METADIR} .else