Prevent the filter_opts local variable from leaking into the
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Dec 2007 23:28:25 +0000 (23:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Dec 2007 23:28:25 +0000 (23:28 -0000)
environment in preprocess_ebuild_env().

svn path=/main/trunk/; revision=8857

bin/ebuild.sh

index 5fcf27794c37c97ff7f22e64b63738b136d73b40..c40403264c46308f0f164440193a642e421a8945 100755 (executable)
@@ -1442,7 +1442,8 @@ preprocess_ebuild_env() {
                filter_opts="--filter-sandbox ${filter_opts}"
        fi
        filter_readonly_variables ${filter_opts} < "${T}"/environment \
-               > "${T}"/environment.filtered
+               > "${T}"/environment.filtered || return $?
+       unset filter_opts
        mv "${T}"/environment.filtered "${T}"/environment || return $?
        rm -f "${T}/environment.success" || return $?
        # WARNING: Code inside this subshell should avoid making assumptions