Use cpv_getkey() instead of dep_getkey() where appropriate.
authorZac Medico <zmedico@gentoo.org>
Tue, 9 Feb 2010 03:21:34 +0000 (03:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 9 Feb 2010 03:21:34 +0000 (03:21 -0000)
svn path=/main/trunk/; revision=15329

bin/glsa-check

index 19f451c5934f188a540c6d28fabf58653f70b95b..4f1b742271277d6e5bd85bda885c4d071a90529c 100755 (executable)
@@ -178,7 +178,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr):
                                fd1.write("... ")
                else:
                        for pkg in myglsa.packages:
-                               mylist = vardb.match(portage.dep_getkey(str(pkg)))
+                               mylist = vardb.match(pkg)
                                if len(mylist) > 0:
                                        pkg = color(" ".join(mylist))
                                fd1.write(" " + pkg + " ")
@@ -228,12 +228,12 @@ if mode in ["dump", "fix", "inject", "pretend"]:
                                sys.stdout.write("The following updates will be performed for this GLSA:\n")
                                for pkg in mergelist:
                                        oldver = None
-                                       for x in vardb.match(portage.dep_getkey(pkg)):
+                                       for x in vardb.match(portage.cpv_getkey(pkg)):
                                                if vardb.aux_get(x, ["SLOT"]) == portdb.aux_get(pkg, ["SLOT"]):
                                                        oldver = x
                                        if oldver == None:
                                                raise ValueError("could not find old version for package %s" % pkg)
-                                       oldver = oldver[len(portage.dep_getkey(oldver))+1:]
+                                       oldver = oldver[len(portage.cpv_getkey(oldver))+1:]
                                        sys.stdout.write("     " + pkg + " (" + oldver + ")\n")
                        else:
                                sys.stdout.write("Nothing to do for this GLSA\n")