Fix quoting to work properly with eval.
authorZac Medico <zmedico@gentoo.org>
Sat, 24 Nov 2007 05:42:10 +0000 (05:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Nov 2007 05:42:10 +0000 (05:42 -0000)
svn path=/main/trunk/; revision=8640

bin/ebuild.sh

index ab663d02832f48f4d414ed5dc6ee2a612a5d848f..d5b770dd8f26c7c4ccb3657ec5033fc5d03ee903 100755 (executable)
@@ -1623,14 +1623,14 @@ elif ! hasq ${EBUILD_PHASE} depend && [ -f "${T}"/environment ] ; then
        fi
        # Colon separated SANDBOX_* variables need to be cumulative.
        for x in SANDBOX_DENY SANDBOX_READ SANDBOX_PREDICT SANDBOX_WRITE ; do
-               eval PORTAGE_${x}="${!x}"
+               eval PORTAGE_${x}=\${!x}
        done
        source "${T}"/environment
        for x in SANDBOX_DENY SANDBOX_PREDICT SANDBOX_READ SANDBOX_WRITE ; do
                eval y=\${PORTAGE_${x}}
                if [ "${y}" != "${!x}" ] ; then
-                       eval export ${x}=$(echo -n "${y}:${!x}" | tr ":" "\0" | \
-                               sort -z -u | tr "\0" ":")
+                       eval export ${x}=\"$(echo -n "${y}:${!x}" | tr ":" "\0" | \
+                               sort -z -u | tr "\0" ":")\"
                fi
                unset PORTAGE_${x}
        done