Properly anchor sed regexp for readlonly attribut filtering.
authorZac Medico <zmedico@gentoo.org>
Tue, 27 Mar 2007 22:49:53 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 27 Mar 2007 22:49:53 +0000 (22:49 -0000)
svn path=/main/trunk/; revision=6301

bin/ebuild.sh

index cb21d9ee9fcc2f5ac2a55ec7f54f96f6f573e309..7951619c33624d5cf913c2e82c5962839cfa452c 100755 (executable)
@@ -912,7 +912,7 @@ dyn_compile() {
        echo "${EAPI:-0}"       > EAPI
        set +f
        set                     >  environment
-       export -p | sed 's:declare -rx:declare -x:' >> environment
+       export | sed 's:^declare -rx:declare -x:' >> environment
        bzip2 -f9 environment
 
        cp "${EBUILD}" "${PF}.ebuild"
@@ -1619,7 +1619,7 @@ if [ -n "${myarg}" ] && \
        umask 002
        set | egrep -v "^SANDBOX_" > "${T}/environment" 2>/dev/null
        export | egrep -v "^declare -x SANDBOX_" | \
-               sed 's:declare -rx:declare -x:' >> "${T}/environment" 2>/dev/null
+               sed 's:^declare -rx:declare -x:' >> "${T}/environment" 2>/dev/null
        chown portage:portage "${T}/environment" &>/dev/null
        chmod g+w "${T}/environment" &>/dev/null
 fi