summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py10
-rw-r--r--pym/portage_dep.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 53eac070..92463ea9 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5968,8 +5968,14 @@ class portdbapi(dbapi):
mytrees = self.porttrees
for oroot in mytrees:
for x in listdir(oroot+"/"+mycp,EmptyOnError=1,ignorecvs=1):
- if x[-7:]==".ebuild":
- d[mysplit[0]+"/"+x[:-7]] = None
+ if x.endswith(".ebuild"):
+ pf = x[:-7]
+ ps = pkgsplit(pf)
+ if not ps:
+ writemsg("\nInvalid ebuild name: %s\n" % \
+ os.path.join(oroot, mycp, x), noiselevel=-1)
+ continue
+ d[mysplit[0]+"/"+pf] = None
return d.keys()
def freeze(self):
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index b1356982..bf40452a 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -607,6 +607,8 @@ def match_from_list(mydep, candidate_list):
elif operator == "~": # version, any revision, match
for x in candidate_list:
xs = catpkgsplit(x)
+ if xs is None:
+ raise InvalidData(x)
if not cpvequal(xs[0]+"/"+xs[1]+"-"+xs[2], mycpv_cps[0]+"/"+mycpv_cps[1]+"-"+mycpv_cps[2]):
continue
if xs[2] != ver: