Avoid redundant news display for bug #412161.
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Apr 2012 07:15:56 +0000 (00:15 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Apr 2012 07:15:56 +0000 (00:15 -0700)
pym/_emerge/main.py

index 0fbc4b7f7256e48a043e4bfd3685b7f42433651c..7fbe84f01063c86a3fb500e14440b72666d2ff25 100644 (file)
@@ -381,7 +381,9 @@ def post_emerge(myaction, myopts, myfiles,
        _flush_elog_mod_echo()
 
        if not vardbapi._pkgs_changed:
-               display_news_notification(root_config, myopts)
+               # GLEP 42 says to display news *after* an emerge --pretend
+               if "--pretend" in myopts:
+                       display_news_notification(root_config, myopts)
                # If vdb state has not changed then there's nothing else to do.
                return
 
@@ -2033,6 +2035,7 @@ def emerge_main(args=None):
                                level=logging.ERROR, noiselevel=-1)
                        return 1
 
+               # GLEP 42 says to display news *after* an emerge --pretend
                if "--pretend" not in myopts:
                        display_news_notification(root_config, myopts)
                retval = action_build(settings, trees, mtimedb,