aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-06-11 12:42:37 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-06-11 12:42:37 +0000
commit50ee1a1d78e5182cc273ed3e55775c70aa039c6f (patch)
tree2c3f959db6394e60aded443b309e95785faa9085
parentdd89ab69eada4c1e5bcda21eaa35e48bb3681d4f (diff)
downloadpaludis-50ee1a1d78e5182cc273ed3e55775c70aa039c6f.tar.gz
paludis-50ee1a1d78e5182cc273ed3e55775c70aa039c6f.tar.xz
Don't export metadata variables or inherit them from the environment.
-rw-r--r--paludis/repositories/gentoo/ebuild/builtin_metadata.bash5
-rwxr-xr-xpaludis/repositories/gentoo/ebuild/ebuild.bash8
2 files changed, 8 insertions, 5 deletions
diff --git a/paludis/repositories/gentoo/ebuild/builtin_metadata.bash b/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
index 30753e1..36d181b 100644
--- a/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
+++ b/paludis/repositories/gentoo/ebuild/builtin_metadata.bash
@@ -28,10 +28,7 @@ ebuild_f_metadata()
[[ -z "${!a}" ]] || die "\$${a} must not be set"
done
- # The list below should include all variables from all EAPIs
- for key in DEPEND RDEPEND PDEPEND IUSE SLOT SRC_URI RESTRICT LICENSE \
- KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION DEPENDENCIES \
- E_IUSE E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS ; do
+ for key in ${EBUILD_METADATA_VARIABLES} ; do
set -o noglob
local k=${!key}
k=${k//\\/\\\\}
diff --git a/paludis/repositories/gentoo/ebuild/ebuild.bash b/paludis/repositories/gentoo/ebuild/ebuild.bash
index 249f880..ae1fb2e 100755
--- a/paludis/repositories/gentoo/ebuild/ebuild.bash
+++ b/paludis/repositories/gentoo/ebuild/ebuild.bash
@@ -25,6 +25,12 @@ set +C
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
eval unset LANG ${!LC_*}
+# The list below should include all variables from all EAPIs
+EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SLOT SRC_URI RESTRICT \
+ LICENSE KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION DEPENDENCIES \
+ E_IUSE E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS"
+unset -v ${EBUILD_METADATA_VARIABLES}
+
if [[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] ; then
export SANDBOX_PREDICT="${SANDBOX_PREDICT+${SANDBOX_PREDICT}:}"
export SANDBOX_PREDICT="${SANDBOX_PREDICT}/proc/self/maps:/dev/console:/dev/random"
@@ -277,7 +283,7 @@ ebuild_load_ebuild()
for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
e_v=E_${v}
- export ${v}="${!v} ${!e_v}"
+ export -n ${v}="${!v} ${!e_v}"
done
[[ ${EAPI-unset} == "unset" ]] && EAPI="0"