Inside post_emerge(), skip the vardbapi counter check when in --pretend
authorZac Medico <zmedico@gentoo.org>
Thu, 19 Feb 2009 07:10:34 +0000 (07:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Feb 2009 07:10:34 +0000 (07:10 -0000)
mode (significant performance improvement). Thanks to Marat Radchenko
(slonopotamus) for reporting.

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

pym/_emerge/__init__.py

index 0200ce30c9124a38101b4c7a1f855961a92e09d1..8c8541313870f4026b8d0d918c8dc121d050d33b 100644 (file)
@@ -12220,8 +12220,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)