aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.pkgng.mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-10-31 01:47:48 +0800
committerbapt <bapt@FreeBSD.org>2013-10-31 01:47:48 +0800
commitd3e970b1ab6e9897c099a44d6625aa7f3ff5658f (patch)
treefa46115894f3d83f8346b1f1f9a6eda7015459e5 /Mk/bsd.pkgng.mk
parent4c1145f18775fd108b7ffe9510fe34892ca854c9 (diff)
downloadfreebsd-ports-gnome-d3e970b1ab6e9897c099a44d6625aa7f3ff5658f.tar.gz
freebsd-ports-gnome-d3e970b1ab6e9897c099a44d6625aa7f3ff5658f.tar.zst
freebsd-ports-gnome-d3e970b1ab6e9897c099a44d6625aa7f3ff5658f.zip
Staging showed that user/groups creation from plist are done in
post-install process instead of pre-install. in case pkgng is in use. Replace it by a new mecanism that allows to append scripts into what will become pre-install, post-install, pre-deinstall or post-deinstall Change the user-group creation to use that mecanism in case the ports tree is using pkgng. Reported by: mandree Reviewed by: bdrewery
Diffstat (limited to 'Mk/bsd.pkgng.mk')
-rw-r--r--Mk/bsd.pkgng.mk21
1 files changed, 17 insertions, 4 deletions
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
index a6306a228fdd..5e2785938390 100644
--- a/Mk/bsd.pkgng.mk
+++ b/Mk/bsd.pkgng.mk
@@ -81,11 +81,24 @@ create-manifest:
.endfor
.undef opt
@${ECHO_CMD} "}" >> ${MANIFESTF}
- @[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \
- [ -f ${PKGPREINSTALL} ] && ${CP} ${PKGPREINSTALL} ${METADIR}/+PRE_INSTALL; \
- [ -f ${PKGPOSTINSTALL} ] && ${CP} ${PKGPOSTINSTALL} ${METADIR}/+POST_INSTALL; \
+ @[ -f ${PKGINSTALL} ] && ${CAT} ${PKGINSTALL} ${METADIR}/+INSTALL; \
+ ${RM} -f ${METADIR}/+PRE_INSTALL ; \
+ for a in ${PKGPREINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_INSTALL ; \
+ done ; \
+ ${RM} -f ${METADIR}/+POST_INSTALL ; \
+ for a in ${PKGPOSTINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_INSTALL ; \
+ done ; \
[ -f ${PKGDEINSTALL} ] && ${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \
- [ -f ${PKGPREDEINSTALL} ] && ${CP} ${PKGPREDEINSTALL} ${METADIR}/+PRE_DEINSTALL; \
+ ${RM} -f ${METADIR}/+PRE_DEINSTALL ; \
+ for a in ${PKGPREDEINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_DEINSTALL ; \
+ done ; \
+ ${RM} -f ${METADIR}/+POST_DEINSTALL ; \
+ for a in ${PKGPOSRDEINSTALL}; do \
+ [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_DEINSTALL ; \
+ done ; \
[ -f ${PKGPOSTDEINSTALL} ] && ${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL; \
[ -f ${PKGUPGRADE} ] && ${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \
[ -f ${PKGPREUPGRADE} ] && ${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \