In portdbapi.cp_list(), validate the ebuild name to ensure
authorZac Medico <zmedico@gentoo.org>
Sun, 4 Nov 2007 09:29:56 +0000 (09:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 4 Nov 2007 09:29:56 +0000 (09:29 -0000)
that it matches the name of the package.

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

pym/portage/dbapi/porttree.py

index ea51f5d7e948dba9eb53b99d5436c86ce70b6902..db2b35aff6aa7af8a60af8d95e9ff37d36254ad0 100644 (file)
@@ -523,6 +523,10 @@ class portdbapi(dbapi):
                                                writemsg("\nInvalid ebuild name: %s\n" % \
                                                        os.path.join(oroot, mycp, x), noiselevel=-1)
                                                continue
+                                       if ps[0] != mysplit[1]:
+                                               writemsg("\nInvalid ebuild name: %s\n" % \
+                                                       os.path.join(oroot, mycp, x), noiselevel=-1)
+                                               continue
                                        d[mysplit[0]+"/"+pf] = None
                if invalid_category and d:
                        writemsg(("\n!!! '%s' has a category that is not listed in " + \