From: Zac Medico Date: Thu, 24 Apr 2008 02:55:58 +0000 (-0000) Subject: Handle potential InvalidDependString exceptions when match packages to X-Git-Tag: v2.2_pre6~123 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=77d9a3543248d71010d34e0b5b465a7a9e58e0f0;p=portage.git Handle potential InvalidDependString exceptions when match packages to system and world atoms in depgraph.altlist(). svn path=/main/trunk/; revision=9955 --- 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