pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Always remove the intermediate files, even ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e888d335dabd
branches:  trunk
changeset: 512034:e888d335dabd
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Apr 29 03:54:10 2006 +0000

description:
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:

 mk/install/bsd.pkginstall.mk |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 1c58a7c94ea8 -r e888d335dabd mk/install/bsd.pkginstall.mk
--- a/mk/install/bsd.pkginstall.mk      Sat Apr 29 03:49:12 2006 +0000
+++ b/mk/install/bsd.pkginstall.mk      Sat Apr 29 03:54:10 2006 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index