diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-02-07 23:40:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-02-07 23:40:30 +0000 |
commit | b9106505a3075b9547c2d177e2c5e782c591b057 (patch) | |
tree | 06d172a0250c67415d1270c7117c2a157106ca5f /bin/ebuild.sh | |
parent | 56f1ecb663097aa9174edd7af3200726a8dcc410 (diff) | |
download | portage-b9106505a3075b9547c2d177e2c5e782c591b057.tar.gz portage-b9106505a3075b9547c2d177e2c5e782c591b057.tar.bz2 portage-b9106505a3075b9547c2d177e2c5e782c591b057.zip |
Bug #155993 - Update environment.bz2 after postinst in case
installation phases need to pass some variables to
uninstallation phases. (trunk r9281)
svn path=/main/branches/2.1.2/; revision=9282
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 61799ad88..eca24c626 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1777,6 +1777,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 |