From 7619fc47624c73fc78c372e41aab39ab83f20865 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 4 Nov 2007 09:29:56 +0000 Subject: [PATCH] In portdbapi.cp_list(), validate the ebuild name to ensure that it matches the name of the package. svn path=/main/trunk/; revision=8421 --- pym/portage/dbapi/porttree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index ea51f5d7e..db2b35aff 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -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 " + \ -- 2.26.2