summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-13 22:56:07 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-13 22:56:07 +0000
commitc247c113310d4b3cc5273d6dc4aa143c6e8bc044 (patch)
tree31bc070d9637427fcb59dbf41c052d682d5b438f
parent629709cb8459689a81f0a22b88bda56e93722c4a (diff)
downloadportage-c247c113310d4b3cc5273d6dc4aa143c6e8bc044.tar.gz
portage-c247c113310d4b3cc5273d6dc4aa143c6e8bc044.tar.bz2
portage-c247c113310d4b3cc5273d6dc4aa143c6e8bc044.zip
Pass all the of the existing package databases into post_emerge() so that we can use them for news and preserve-libs.
svn path=/main/trunk/; revision=6839
-rw-r--r--pym/emerge/__init__.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index b3a03b632..43bf54e57 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -3810,7 +3810,7 @@ def display_news_notification(settings):
print "Use " + colorize("GOOD", "eselect news") + " to read news items."
print
-def post_emerge(settings, mtimedb, retval, vardbapi):
+def post_emerge(trees, mtimedb, retval):
"""
Misc. things to run at the end of a merge session.
@@ -3820,9 +3820,9 @@ def post_emerge(settings, mtimedb, retval, vardbapi):
Commit mtimeDB
Display preserved libs warnings
Exit Emerge
-
- @param settings: Configuration settings (typically portage.settings)
- @type settings: portage.config()
+
+ @param trees: A dictionary mapping each ROOT to it's package databases
+ @type trees: dict
@param mtimedb: The mtimeDB to store data needed across merge invocations
@type mtimedb: MtimeDB class instance
@param retval: Emerge's return value
@@ -3831,7 +3831,11 @@ def post_emerge(settings, mtimedb, retval, vardbapi):
@returns:
1. Calls sys.exit(retval)
"""
- target_root = settings["ROOT"]
+ for target_root in trees:
+ if len(trees) > 1 and target_root != "/":
+ break
+ vardbapi = trees[target_root]["vartree"].dbapi
+ settings = vardbapi.settings
info_mtimes = mtimedb["info"]
# Load the most current variables from ${ROOT}/etc/profile.env
@@ -5695,14 +5699,14 @@ def emerge_main():
if 1 == unmerge(settings, myopts, vartree, myaction, myfiles,
mtimedb["ldpath"]):
if "--pretend" not in myopts:
- post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi)
+ post_emerge(trees, mtimedb, os.EX_OK)
elif "depclean"==myaction:
validate_ebuild_environment(trees)
action_depclean(settings, trees, mtimedb["ldpath"],
myopts, spinner)
if "--pretend" not in myopts:
- post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi)
+ post_emerge(trees, mtimedb, os.EX_OK)
# "update", "system", or just process files:
else:
validate_ebuild_environment(trees)
@@ -5711,7 +5715,7 @@ def emerge_main():
action_build(settings, trees, mtimedb,
myopts, myaction, myfiles, spinner)
if "--pretend" not in myopts:
- post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi)
+ post_emerge(trees, mtimedb, os.EX_OK)
else:
display_news_notification(settings)