diff options
author | Marius Mauch <genone@gentoo.org> | 2007-06-13 17:40:35 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2007-06-13 17:40:35 +0000 |
commit | 094e9c5789ad58c3ba450aa1f15b9ad4b0bf24de (patch) | |
tree | c9eb2c5010db63c13a0bf636be908978754dff3f | |
parent | b66cb43f493aa68ec29ada2bd679080636daddc5 (diff) | |
download | portage-094e9c5789ad58c3ba450aa1f15b9ad4b0bf24de.tar.gz portage-094e9c5789ad58c3ba450aa1f15b9ad4b0bf24de.tar.bz2 portage-094e9c5789ad58c3ba450aa1f15b9ad4b0bf24de.zip |
Get registry object from vardbapi directly instead of creating another one
svn path=/main/trunk/; revision=6836
-rw-r--r-- | pym/emerge/__init__.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 3217382e8..8b52ed356 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -31,7 +31,7 @@ except ImportError: import portage del os.environ["PORTAGE_LEGACY_GLOBALS"] from portage import digraph, portdbapi -from portage.const import NEWS_LIB_PATH, CACHE_PATH +from portage.const import NEWS_LIB_PATH, CACHE_PATH, PRIVATE_PATH import emerge.help import portage.xpak, commands, errno, re, socket, time, types @@ -3802,7 +3802,7 @@ def display_news_notification(settings): print "Use " + colorize("GOOD", "eselect news") + " to read news items." print -def post_emerge(settings, mtimedb, retval): +def post_emerge(settings, mtimedb, retval, vardbapi): """ Misc. things to run at the end of a merge session. @@ -3847,11 +3847,9 @@ def post_emerge(settings, mtimedb, retval): display_news_notification(settings) - from portage.dbapi.vartree import PreservedLibsRegistry - plib_registry = PreservedLibsRegistry(os.path.join(target_root, CACHE_PATH, "preserved_libs_registry")) - if plib_registry.hasEntries(): + if vardbapi.plib_registry.hasEntries(): print colorize("WARN", "!!!") + " existing preserved libs:" - plibdata = plib_registry.getPreservedLibs() + plibdata = vardbapi.plib_registry.getPreservedLibs() for cpv in plibdata.keys(): print colorize("WARN", ">>>") + " package: %s" % cpv for f in plibdata[cpv]: @@ -5689,14 +5687,14 @@ def emerge_main(): if 1 == unmerge(settings, myopts, vartree, myaction, myfiles, mtimedb["ldpath"]): if "--pretend" not in myopts: - post_emerge(settings, mtimedb, 0) + post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi) 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) + post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi) # "update", "system", or just process files: else: validate_ebuild_environment(trees) @@ -5705,7 +5703,7 @@ def emerge_main(): action_build(settings, trees, mtimedb, myopts, myaction, myfiles, spinner) if "--pretend" not in myopts: - post_emerge(settings, mtimedb, 0) + post_emerge(settings, mtimedb, 0, trees[settings["ROOT"]]["vartree"].dbapi) else: display_news_notification(settings) |