diff options
author | tv <tv> | 2006-06-04 20:10:12 +0000 |
---|---|---|
committer | tv <tv> | 2006-06-04 20:10:12 +0000 |
commit | 4a29a177e7c95f42c118b632ae8a2447d4104f26 (patch) | |
tree | d50b66db70c9f3bbabdf810b8bb8697304d9128a /mk/bsd.pkg.mk | |
parent | 04e95d15208e60676bb0a89772c250d569ecb94f (diff) | |
download | pkgsrc-4a29a177e7c95f42c118b632ae8a2447d4104f26.tar.gz |
Fix problem in su-target: the exitcode of the make command is discarded,
so it would exit successfully even if the sub-make failed. This caused
rather interesting behavior with SU_CMD=sudo, and sudo timed out. Ensure
that the result code is preserved by using a && chain rather than ;.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index ff750cddd9a..7244424f8a2 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1833 2006/06/04 08:25:52 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1834 2006/06/04 20:10:12 tv Exp $ # # This file is in the public domain. # @@ -1706,8 +1706,8 @@ su-target: .USE *) ${ECHO} "*** WARNING *** Running: "${PRE_ROOT_CMD:Q} ;; \ esac; \ ${PRE_ROOT_CMD}; \ - ${ECHO_MSG} "${_PKGSRC_IN}> Becoming \`\`${ROOT_USER}'' to make su-${.TARGET} (`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'`)"; \ - ${SU_CMD} "cd ${.CURDIR}; ${SETENV} PATH='$${PATH}:${SU_CMD_PATH_APPEND}' ${MAKE} ${MAKEFLAGS} PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL} su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}"; \ + ${ECHO_MSG} "${_PKGSRC_IN}> Becoming \`\`${ROOT_USER}'' to make su-${.TARGET} (`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'`)" && \ + ${SU_CMD} "cd ${.CURDIR}; ${SETENV} PATH='$${PATH}:${SU_CMD_PATH_APPEND}' ${MAKE} ${MAKEFLAGS} PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL} su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}" && \ ${ECHO_MSG} "${_PKGSRC_IN}> Dropping \`\`${ROOT_USER}'' privileges."; \ fi |