summaryrefslogtreecommitdiffstats
path: root/pym
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 /pym
parentdd8a658710fc50723850f48d88224046c285e79f (diff)
downloadportage-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 'pym')
-rw-r--r--pym/portage/__init__.py2
-rw-r--r--pym/portage/dbapi/vartree.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 0dc6f1c40..741c99078 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -886,7 +886,7 @@ class config(object):
"PORTAGE_IUSE",
"PORTAGE_LOG_FILE", "PORTAGE_MASTER_PID",
"PORTAGE_PYM_PATH", "PORTAGE_REPO_NAME", "PORTAGE_RESTRICT",
- "PORTAGE_TMPDIR", "PORTAGE_WORKDIR_MODE",
+ "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_WORKDIR_MODE",
"PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PROFILE_PATHS",
"ROOT", "ROOTPATH", "STARTDIR", "T", "TMP", "TMPDIR",
"USE_EXPAND", "USE_ORDER", "WORKDIR",
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 3b11823b6..002a9f373 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2152,8 +2152,12 @@ class dblink(object):
self.vartree.dbapi.libmap.update()
#do postinst script
+ self.settings["PORTAGE_UPDATE_ENV"] = \
+ os.path.join(self.dbpkgdir, "environment.bz2")
+ self.settings.backup_changes("PORTAGE_UPDATE_ENV")
a = doebuild(myebuild, "postinst", destroot, self.settings, use_cache=0,
tree=self.treetype, mydbapi=mydbapi, vartree=self.vartree)
+ self.settings.pop("PORTAGE_UPDATE_ENV", None)
# XXX: Decide how to handle failures here.
if a != os.EX_OK: