chk_updated_cfg_files: fix plurality of message
authorZac Medico <zmedico@gentoo.org>
Tue, 22 Feb 2011 02:38:45 +0000 (18:38 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 Feb 2011 03:13:32 +0000 (19:13 -0800)
This will fix bug #355803.

pym/_emerge/actions.py

index eece67139a531c209083fced591f96c3f0c627a0..616995042d0a722269de4e3179707ea8afeb8c20 100644 (file)
@@ -2923,9 +2923,15 @@ def chk_updated_cfg_files(eroot, config_protect):
        for x in result:
                print("\n"+colorize("WARN", " * IMPORTANT:"), end=' ')
                if not x[1]: # it's a protected file
-                       print("config file '%s' needs updating." % x[0])
+                       writemsg_level("config file '%s' needs updating.\n" % x[0],
+                               level=logging.INFO, noiselevel=-1)
                else: # it's a protected dir
-                       print("%d config files in '%s' need updating." % (len(x[1]), x[0]))
+                       if len(x[1]) == 1:
+                               writemsg_level("config file '%s' needs updating.\n" % x[1][0],
+                                       level=logging.INFO, noiselevel=-1)
+                       else:
+                               writemsg_level("%d config files in '%s' need updating.\n" % \
+                                       (len(x[1]), x[0]), level=logging.INFO, noiselevel=-1)
 
        if result:
                print(" "+yellow("*")+" See the "+colorize("INFORM","CONFIGURATION FILES")\