diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index 3947db8cd..5a6d33c8b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7703,6 +7703,7 @@ class portdbapi(dbapi): mytrees = [mytree] else: mytrees = self.porttrees + from portage_versions import ver_regexp for oroot in mytrees: try: file_list = os.listdir(os.path.join(oroot, mycp)) @@ -7720,6 +7721,11 @@ class portdbapi(dbapi): writemsg("\nInvalid ebuild name: %s\n" % \ os.path.join(oroot, mycp, x), noiselevel=-1) continue + ver_match = ver_regexp.match("-".join(ps[1:])) + if ver_match is None or not ver_match.groups(): + writemsg("\nInvalid ebuild version: %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 " + \ |