summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorjlam <jlam>2006-04-29 03:54:10 +0000
committerjlam <jlam>2006-04-29 03:54:10 +0000
commit0f985fa2589596fd07171b2de09cd4ff40db482e (patch)
tree4f4ddca1a8e8077a9f50fc2196eeface33559051 /mk/install
parentf70bb6d87b8ec32c703c37032e7615306cf5af74 (diff)
downloadpkgsrc-0f985fa2589596fd07171b2de09cd4ff40db482e.tar.gz
Always remove the intermediate files, even if the +USERGROUP script
determines the users and/or groups don't exist. This makes "make clean" work properly for non-root users.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/bsd.pkginstall.mk16
1 files changed, 10 insertions, 6 deletions
diff --git a/mk/install/bsd.pkginstall.mk b/mk/install/bsd.pkginstall.mk
index 2c2df47d95d..279d2d811c6 100644
--- a/mk/install/bsd.pkginstall.mk
+++ b/mk/install/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.51 2006/04/29 03:09:40 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.52 2006/04/29 03:54:10 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -290,14 +290,18 @@ do-su-create-usergroup:
create-usergroup: ${_INSTALL_USERGROUP_UNPACKER}
${_PKG_SILENT}${_PKG_DEBUG} \
cd ${_PKGINSTALL_DIR} && \
- ${SH} ${_INSTALL_USERGROUP_UNPACKER} && \
- ${TEST} -f ./+USERGROUP && \
- ./+USERGROUP ADD ${_PKG_DBDIR}/${PKGNAME} && \
- ./+USERGROUP CHECK-ADD ${_PKG_DBDIR}/${PKGNAME} && \
+ ${SH} ${_INSTALL_USERGROUP_UNPACKER}; \
+ exitcode=1; \
+ if ${TEST} -f ./+USERGROUP && \
+ ./+USERGROUP ADD ${_PKG_DBDIR}/${PKGNAME} && \
+ ./+USERGROUP CHECK-ADD ${_PKG_DBDIR}/${PKGNAME}; then \
+ exitcode=0; \
+ fi; \
${RM} -f ${_INSTALL_USERGROUP_FILE:Q} \
${_INSTALL_USERGROUP_DATAFILE:Q} \
${_INSTALL_USERGROUP_UNPACKER:Q} \
- ./+USERGROUP
+ ./+USERGROUP; \
+ exit $$exitcode
# SPECIAL_PERMS are lists that look like:
# file user group mode