diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-02-07 23:30:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-02-07 23:30:49 +0000 |
commit | 5b1097cb11fb1c835e46bf778c927ac29d6ce88b (patch) | |
tree | 8b173f11411d31890245075f8308b8271c565e11 /bin/ebuild.sh | |
parent | dd8a658710fc50723850f48d88224046c285e79f (diff) | |
download | portage-5b1097cb11fb1c835e46bf778c927ac29d6ce88b.tar.gz portage-5b1097cb11fb1c835e46bf778c927ac29d6ce88b.tar.bz2 portage-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-x | bin/ebuild.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |