summaryrefslogtreecommitdiffstats
path: root/pym/portage_dep.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-18 20:54:40 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-18 20:54:40 +0000
commitc22f2f0be29e3647914ca1dc88af1648db41d674 (patch)
tree72a5fc5dc26a9732cd5fa6005654489a789d63c9 /pym/portage_dep.py
parent507274cca8e233e5a6f052d50509bd3cf1f719ff (diff)
downloadportage-c22f2f0be29e3647914ca1dc88af1648db41d674.tar.gz
portage-c22f2f0be29e3647914ca1dc88af1648db41d674.tar.bz2
portage-c22f2f0be29e3647914ca1dc88af1648db41d674.zip
Validate ebuild names in portdbapi.cp_list() and raise an raise an informative InvalidData exception from match_from_list when necessary. (trunk r5712:5714)
svn path=/main/branches/2.1.2/; revision=5715
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index b13569822..bf40452ac 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: