summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-07 23:30:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-07 23:30:49 +0000
commit5b1097cb11fb1c835e46bf778c927ac29d6ce88b (patch)
tree8b173f11411d31890245075f8308b8271c565e11 /bin/ebuild.sh
parentFor the useq() IUSE qa check, use [[ $u =~ $PORTAGE_IUSE ]] instead (diff)
downloadportage-multirepo-5b1097cb11fb1c835e46bf778c927ac29d6ce88b.tar.gz
portage-multirepo-5b1097cb11fb1c835e46bf778c927ac29d6ce88b.tar.bz2
portage-multirepo-5b1097cb11fb1c835e46bf778c927ac29d6ce88b.zip
Bug #155993 - Update environment.bz2 after postinst in case
installation phases need to pass some variables to uninstallation phases. svn path=/main/trunk/; revision=9281
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 6752df9a..61f6e18f 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1781,6 +1781,16 @@ if [ -n "${EBUILD_SH_ARGS}" ] ; then
ebuild_phase_with_hooks pkg_${EBUILD_SH_ARGS}
set +x
fi
+ if [[ $EBUILD_PHASE == postinst ]] && [[ -n $PORTAGE_UPDATE_ENV ]]; then
+ # Update environment.bz2 in case installation phases
+ # need to pass some variables to uninstallation phases.
+ (
+ unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_
+ save_ebuild_env | filter_readonly_variables \
+ --filter-sandbox --allow-extra-vars | \
+ bzip2 -c -f9 > "$PORTAGE_UPDATE_ENV"
+ )
+ fi
;;
unpack|compile|test|clean|install)
if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then