From f2893574cd6b22a5262ab0c48e3a379ec4949335 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 1 Aug 2008 07:05:00 +0000 Subject: Bug #233252 - Handle InvalidAtom exceptions that can be raised from depgraph._add_dep() calls inside _add_pkg_deps(). svn path=/main/trunk/; revision=11309 --- pym/_emerge/__init__.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'pym') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index f002aa318..a401e7e09 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -4624,25 +4624,30 @@ class depgraph(object): return 0 if debug: print "Candidates:", selected_atoms + for atom in selected_atoms: - if isinstance(atom, basestring) \ - and not portage.isvalidatom(atom): + try: + + blocker = atom.startswith("!") + if blocker: + atom = atom[1:] + mypriority = dep_priority.copy() + if not blocker and vardb.match(atom): + mypriority.satisfied = True + + if not self._add_dep(Dependency(atom=atom, + blocker=blocker, depth=depth, parent=pkg, + priority=mypriority, root=dep_root), + allow_unsatisfied=allow_unsatisfied): + return 0 + + except portage.exception.InvalidAtom, e: show_invalid_depstring_notice( - pkg, dep_string, str(atom)) + pkg, dep_string, str(e)) + del e if not pkg.installed: return 0 - continue - blocker = atom.startswith("!") - if blocker: - atom = atom[1:] - mypriority = dep_priority.copy() - if not blocker and vardb.match(atom): - mypriority.satisfied = True - if not self._add_dep(Dependency(atom=atom, - blocker=blocker, depth=depth, parent=pkg, - priority=mypriority, root=dep_root), - allow_unsatisfied=allow_unsatisfied): - return 0 + if debug: print "Exiting...", jbigkey except ValueError, e: -- cgit v1.2.3-1-g7c22