diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-01 07:05:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-01 07:05:00 +0000 |
commit | f2893574cd6b22a5262ab0c48e3a379ec4949335 (patch) | |
tree | e9c4ddd7c317f1b8f94cff168e15c0ce3f8dd112 | |
parent | 636869d60cf57515c95c61ca9c21f9727bde80e2 (diff) | |
download | portage-f2893574cd6b22a5262ab0c48e3a379ec4949335.tar.gz portage-f2893574cd6b22a5262ab0c48e3a379ec4949335.tar.bz2 portage-f2893574cd6b22a5262ab0c48e3a379ec4949335.zip |
Bug #233252 - Handle InvalidAtom exceptions that can be raised from
depgraph._add_dep() calls inside _add_pkg_deps().
svn path=/main/trunk/; revision=11309
-rw-r--r-- | pym/_emerge/__init__.py | 35 |
1 files changed, 20 insertions, 15 deletions
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: |