In display_news_notification(), use the exising vartree instance to populate
authorZac Medico <zmedico@gentoo.org>
Sun, 6 Sep 2009 10:18:27 +0000 (10:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 6 Sep 2009 10:18:27 +0000 (10:18 -0000)
settings.treeVirtuals, to avoid having a temporary one instantiated. Thanks
to Marat Radchenko <slonopotamusorama@gmail.com> for reporting.

svn path=/main/trunk/; revision=14208

pym/_emerge/actions.py

index 399ff10017936e349e002c18974b69370ef6fc67..f8c511a6600f86f6ddf16372c0a6f6645e7a3763 100644 (file)
@@ -2626,6 +2626,12 @@ def display_news_notification(root_config, myopts):
        newsReaderDisplay = False
        update = "--pretend" not in myopts
 
+       if not settings.treeVirtuals:
+               # Populate these using our existing vartree, to avoid
+               # having a temporary one instantiated.
+               settings.treeVirtuals = portage.util.map_dictlist_vals(
+                       portage.getCPFromCPV, trees["vartree"].get_all_provides())
+
        for repo in portdb.getRepositories():
                unreadItems = checkUpdatedNewsItems(
                        portdb, vardb, NEWS_PATH, UNREAD_PATH, repo, update=update)