summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-24 02:55:58 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-24 02:55:58 +0000
commit77d9a3543248d71010d34e0b5b465a7a9e58e0f0 (patch)
tree62ebf1f4ff5a5b37621b6da65d3d179b2934463a
parent847e2ea56d55cd536ddc028d4d0bb4b5da1344d6 (diff)
downloadportage-77d9a3543248d71010d34e0b5b465a7a9e58e0f0.tar.gz
portage-77d9a3543248d71010d34e0b5b465a7a9e58e0f0.tar.bz2
portage-77d9a3543248d71010d34e0b5b465a7a9e58e0f0.zip
Handle potential InvalidDependString exceptions when match packages to
system and world atoms in depgraph.altlist(). svn path=/main/trunk/; revision=9955
-rw-r--r--pym/_emerge/__init__.py35
1 files changed, 21 insertions, 14 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 7a927b6d6..43f57349a 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3508,10 +3508,13 @@ class depgraph(object):
# by a normal upgrade operation then require
# user intervention.
skip = False
- for atom in root_config.sets[
- "system"].iterAtomsForPackage(task):
+ try:
+ for atom in root_config.sets[
+ "system"].iterAtomsForPackage(task):
+ skip = True
+ break
+ except portage.exception.InvalidDependString:
skip = True
- break
if skip:
continue
@@ -3519,17 +3522,21 @@ class depgraph(object):
# when necessary, as long as the atom will be satisfied
# in the final state.
graph_db = self.mydbapi[task.root]
- for atom in root_config.sets[
- "world"].iterAtomsForPackage(task):
- satisfied = False
- for cpv in graph_db.match(atom):
- if cpv == inst_pkg.cpv and inst_pkg in graph_db:
- continue
- satisfied = True
- break
- if not satisfied:
- skip = True
- break
+ try:
+ for atom in root_config.sets[
+ "world"].iterAtomsForPackage(task):
+ satisfied = False
+ for cpv in graph_db.match(atom):
+ if cpv == inst_pkg.cpv and \
+ inst_pkg in graph_db:
+ continue
+ satisfied = True
+ break
+ if not satisfied:
+ skip = True
+ break
+ except portage.exception.InvalidDependString:
+ skip = True
if skip:
continue