diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-20 01:11:14 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-20 01:11:14 +0000 |
commit | 7c0b4711eb419bb4154dbf8c1e08e3de2e6d2879 (patch) | |
tree | d8d57e0aa094fa888b537a6345ef0ca0cee2410a /mk/bsd.pkg.mk | |
parent | 7460df377f4d0711de465e165af777c42be09274 (diff) | |
download | pkgsrc-7c0b4711eb419bb4154dbf8c1e08e3de2e6d2879.tar.gz |
Reverted the SU_CMD change from between 1.1748 and 1.1749 almost
completely. The only difference to revision 1.1748 is that the
PATH=$$PATH:${SU_CMD_PATH_APPEND} argument is included in single quotes.
This will lead to problems when the PATH should contain single quotes
but works in all other cases. (Single quotes in the PATH hadn't worked
before either.) The tricky part regarding this code is that the PATH and
.CURDIR bypass the SU_CMD. They are evaluated before and inserted as
literals into the command that is executed by the SU_CMD. Preserving
these variables this way circumvents interpretation and modification
through the SU_CMD, but leads to ugly rules for quoting which are
currently not handled completely correctly.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 9c1db3e1e2b..e4573bcef37 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1762 2005/11/19 12:30:41 rillig Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1763 2005/11/20 01:11:14 rillig Exp $ # # This file is in the public domain. # @@ -2782,8 +2782,9 @@ _SU_TARGET= \ ${PRE_ROOT_CMD}; \ fi; \ ${ECHO_MSG} "${_PKGSRC_IN}> Becoming ${ROOT_USER}@`${HOSTNAME_CMD}` to $$action ${PKGBASE}."; \ + ${ECHO_MSG} "cd ${.CURDIR}; ${SETENV} PATH='$${PATH}:${SU_CMD_PATH_APPEND}' ${MAKE} $$args ${MAKEFLAGS} $$realtarget $$realflags"; \ ${ECHO_N} "`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'` ";\ - ${SU_CMD} 'cd ${.CURDIR}; path=$${PATH}:${SU_CMD_PATH_APPEND:Q}; ${SETENV} PATH="$${path}" ${MAKE} '"$$args"' ${MAKEFLAGS} '"$$realtarget"' '"$$realflags"''; \ + ${SU_CMD} "cd ${.CURDIR}; ${SETENV} PATH='$${PATH}:${SU_CMD_PATH_APPEND}' ${MAKE} $$args ${MAKEFLAGS} $$realtarget $$realflags"; \ fi .PHONY: do-su-install |