aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-28 02:45:57 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-28 02:45:57 +0000
commit5c0e758c5cca7dfebeeef66c30c05c77365973f7 (patch)
treefd4829ca6a135f7c4d0baa9966760131857a5c04
parent963d98b02b60b3cd48e4dd4dec4c59d9790ec8ce (diff)
downloadpaludis-5c0e758c5cca7dfebeeef66c30c05c77365973f7.tar.gz
paludis-5c0e758c5cca7dfebeeef66c30c05c77365973f7.tar.xz
Make sure variables from saved environments get exported properly, since declare -x is broken inside functions
-rw-r--r--paludis/repositories/gentoo/ebuild/builtin_saveenv.bash1
-rwxr-xr-xpaludis/repositories/gentoo/ebuild/ebuild.bash5
2 files changed, 5 insertions, 1 deletions
diff --git a/paludis/repositories/gentoo/ebuild/builtin_saveenv.bash b/paludis/repositories/gentoo/ebuild/builtin_saveenv.bash
index 8a4d1be..097578f 100644
--- a/paludis/repositories/gentoo/ebuild/builtin_saveenv.bash
+++ b/paludis/repositories/gentoo/ebuild/builtin_saveenv.bash
@@ -29,6 +29,7 @@ builtin_saveenv()
-e '/^\(declare -[rx]\+ \)\?SHELLOPTS/d' \
-e '/^\(declare -[rx]\+ \)\?EBUILD_KILL_PID/d' \
-e 's:^declare -rx:declare -x:' \
+ -e 's:^declare -x :export :' \
> ${PALUDIS_LOADSAVEENV_DIR}/loadsaveenv
}
diff --git a/paludis/repositories/gentoo/ebuild/ebuild.bash b/paludis/repositories/gentoo/ebuild/ebuild.bash
index 94c8a2e..69f29cf 100755
--- a/paludis/repositories/gentoo/ebuild/ebuild.bash
+++ b/paludis/repositories/gentoo/ebuild/ebuild.bash
@@ -189,7 +189,10 @@ ebuild_scrub_environment()
export -p >>"${1}"
) || return $?
- sed -i -e 's:^declare -rx:declare -x:' "${filters[@]}" "${1}"
+ sed -i \
+ -e 's:^declare -rx:declare -x:' \
+ -e 's:^declare -x :export :' \
+ "${filters[@]}" "${1}"
}
ebuild_load_environment()