pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Reverted the SU_CMD change from between 1.1748 and ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/abe201d65ac8
branches:  trunk
changeset: 503406:abe201d65ac8
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Nov 20 01:11:14 2005 +0000

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

 mk/bsd.pkg.mk |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 72718622c4a1 -r abe201d65ac8 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sat Nov 19 22:55:24 2005 +0000
+++ b/mk/bsd.pkg.mk     Sun Nov 20 01:11:14 2005 +0000
@@ -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 @@
                        ${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



Home | Main Index | Thread Index | Old Index