Shorten the preserved libs message when in --quiet mode. Thanks to Sebastian
authorZac Medico <zmedico@gentoo.org>
Tue, 7 Jul 2009 09:11:39 +0000 (09:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 7 Jul 2009 09:11:39 +0000 (09:11 -0000)
Mingramm (few) <s.mingramm@gmx.de> for this patch.

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

pym/_emerge/main.py

index 4826796299beeda25653d7fb8f46b51fbcd9fe22..f211f65c852e1b7787f623d8620351bb7bf2ebe9 100644 (file)
@@ -202,15 +202,21 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                                if icount > 0:
                                        out.einfo("Processed %d info files." % (icount,))
 
-def display_preserved_libs(vardbapi):
+def display_preserved_libs(vardbapi, myopts):
        MAX_DISPLAY = 3
 
        # Ensure the registry is consistent with existing files.
        vardbapi.plib_registry.pruneNonExisting()
 
        if vardbapi.plib_registry.hasEntries():
-               print
-               print colorize("WARN", "!!!") + " existing preserved libs:"
+               if "--quiet" in myopts:
+                       print
+                       print colorize("WARN", "!!!") + " existing preserved libs found"
+                       return
+               else:
+                       print
+                       print colorize("WARN", "!!!") + " existing preserved libs:"
+
                plibdata = vardbapi.plib_registry.getPreservedLibs()
                linkmap = vardbapi.linkmap
                consumer_map = {}
@@ -347,7 +353,7 @@ def post_emerge(root_config, myopts, mtimedb, retval):
 
        display_news_notification(root_config, myopts)
        if retval in (None, os.EX_OK) or (not "--pretend" in myopts):
-               display_preserved_libs(vardbapi)        
+               display_preserved_libs(vardbapi, myopts)        
 
        sys.exit(retval)