From 5b1097cb11fb1c835e46bf778c927ac29d6ce88b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 7 Feb 2008 23:30:49 +0000 Subject: 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 --- bin/ebuild.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin/ebuild.sh') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 6752df9ae..61f6e18fe 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 -- cgit v1.2.3-1-g7c22