svn commit: r315444 - head/Mk

Baptiste Daroussin bapt at FreeBSD.org
Thu Mar 28 07:01:00 UTC 2013


Author: bapt
Date: Thu Mar 28 07:00:59 2013
New Revision: 315444
URL: http://svnweb.freebsd.org/changeset/ports/315444

Log:
  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.

Modified:
  head/Mk/bsd.pkgng.mk

Modified: head/Mk/bsd.pkgng.mk
==============================================================================
--- head/Mk/bsd.pkgng.mk	Thu Mar 28 06:54:46 2013	(r315443)
+++ head/Mk/bsd.pkgng.mk	Thu Mar 28 07:00:59 2013	(r315444)
@@ -17,6 +17,11 @@ PKGPOSTDEINSTALL?=	${PKGDIR}/pkg-post-de
 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


More information about the svn-ports-head mailing list