summaryrefslogtreecommitdiff
path: root/bin
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
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')
-rwxr-xr-xbin/ebuild.sh10
-rwxr-xr-xbin/isolated-functions.sh3
2 files changed, 12 insertions, 1 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
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 5750ce8d..ee73e7bc 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 \