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 | |
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')
-rwxr-xr-x | bin/ebuild.sh | 10 | ||||
-rwxr-xr-x | bin/isolated-functions.sh | 3 |
2 files changed, 12 insertions, 1 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 diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 5750ce8dd..ee73e7bcd 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -470,7 +470,8 @@ save_ebuild_env() { PORTAGE_COLORMAP PORTAGE_CONFIGROOT PORTAGE_DEBUG \ PORTAGE_DEPCACHEDIR PORTAGE_GID PORTAGE_INST_GID \ PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \ - PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_WORKDIR_MODE PORTDIR \ + PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_UPDATE_ENV \ + PORTAGE_WORKDIR_MODE PORTDIR \ PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \ PROFILE_PATHS PWORKDIR QA_INTERCEPTORS \ RC_DEFAULT_INDENT RC_DOT_PATTERN RC_ENDCOL \ |