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

svn path=/main/branches/2.1.2/; revision=8422

pym/portage.py

index 53e3089b0bdd83024d41abb8624cfafa02c5e5c5..4c118cb4b399e950412fb2477def12deb41a5fc6 100644 (file)
@@ -6777,6 +6777,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 " + \