diff options
author | tv <tv@pkgsrc.org> | 2006-06-04 20:10:12 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2006-06-04 20:10:12 +0000 |
commit | a540af7b7d81fdc7478885ae98108865783a2340 (patch) | |
tree | d50b66db70c9f3bbabdf810b8bb8697304d9128a /mk | |
parent | 76b2ea2eb5d32ba9e6f6207ab348aa95ff0cf831 (diff) | |
download | pkgsrc-a540af7b7d81fdc7478885ae98108865783a2340.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')
-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 |