Use vdb information for verbose list mode (patch by solar)
authorgenone <genone@gentoo.org>
Tue, 24 Jan 2006 16:36:19 +0000 (16:36 -0000)
committergenone <genone@gentoo.org>
Tue, 24 Jan 2006 16:36:19 +0000 (16:36 -0000)
svn path=/; revision=275

trunk/ChangeLog
trunk/src/glsa-check/glsa-check

index 76761164be337a1e7c81ad1dd61f7171db6167cb..fd8884a8f3e96faa321a06f3e55f767a3af30211 100644 (file)
@@ -1,3 +1,6 @@
+2006-01-24 Marius Mauch <genone@gentoo.org>
+       * glsa-check: Use vbd information in verbose list mode (patch by solar)
+
 2006-01-18 Paul Varner <fuzzyray@gentoo.org>
        * revdep-rebuild: Add capability to check libtool .la files for
        non-existant references.
index a35fd9ad7f7cee46580398f7321028923e3475dd..9758e1cefa89525eb590d74a7ebb55bcc6aed61c 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-# $Header$
+# $Header$
 # This program is licensed under the GPL, version 2
 
 import os,string,sys
@@ -11,7 +11,7 @@ from getopt import getopt,GetoptError
 
 __program__ = "glsa-check"
 __author__ = "Marius Mauch <genone@gentoo.org>"
-__version__ = "0.6"
+__version__ = "0.6.1"
 
 optionmap = [
 ["-l", "--list", "list all unapplied GLSA"],
@@ -181,11 +181,19 @@ if mode == "list":
                else:
                        status = "[U]"
                        color = green
-               sys.stdout.write(color(myglsa.nr) + " " + color(status) + " " + myglsa.title + " (") 
-               for pkg in myglsa.packages.keys()[:3]:
-                       sys.stdout.write(" " + pkg + " ")
-               if len(myglsa.packages) > 3:
-                       sys.stdout.write("... ")
+               sys.stdout.write(color(myglsa.nr) + " " + color(status) + " " + myglsa.title + " (")
+               if not verbose:
+                       for pkg in myglsa.packages.keys()[:3]:
+                               sys.stdout.write(" " + pkg + " ")
+                       if len(myglsa.packages) > 3:
+                               sys.stdout.write("... ")
+               else:
+                       for pkg in myglsa.packages.keys():
+                               mylist = portage.db["/"]["vartree"].dbapi.match(portage.dep_getkey(pkg))
+                               if len(mylist) > 0:
+                                       pkg = color(" ".join(mylist))
+                               sys.stdout.write(" " + pkg + " ")
+
                sys.stdout.write(")")
                if list_cve:
                        sys.stdout.write(" "+(",".join([r[:13] for r in myglsa.references if r[:4] == "CAN-"])))