Inside post_emerge(), skip the vardbapi counter check when in --pretend
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 05:47:28 +0000 (05:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 05:47:28 +0000 (05:47 -0000)
mode (significant performance improvement). Thanks to Marat Radchenko
(slonopotamus) for reporting. (trunk r12636)

svn path=/main/branches/2.1.6/; revision=12908

pym/_emerge/__init__.py

index 86bdd706d4ac5e223e7d02e3bdda32d3612f532d..2a02262c165867aa7033ef3de2c9975340e069d8 100644 (file)
@@ -12046,8 +12046,8 @@ def post_emerge(root_config, myopts, mtimedb, retval):
        _flush_elog_mod_echo()
 
        counter_hash = settings.get("PORTAGE_COUNTER_HASH")
-       if counter_hash is not None and \
-               counter_hash == vardbapi._counter_hash():
+       if "--pretend" in myopts or (counter_hash is not None and \
+               counter_hash == vardbapi._counter_hash()):
                display_news_notification(root_config, myopts)
                # If vdb state has not changed then there's nothing else to do.
                sys.exit(retval)