From: Zac Medico Date: Wed, 1 Oct 2008 21:17:32 +0000 (-0000) Subject: Bug #239272 - Handle InvalidAtom exception inside X-Git-Tag: v2.2_rc12~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dbf0b9ca3ca89cc14941f646735e987044cd2f8f;p=portage.git Bug #239272 - Handle InvalidAtom exception inside depgraph.validate_blockers(). svn path=/main/trunk/; revision=11604 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 87269a135..8a7175fd4 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5890,10 +5890,16 @@ class depgraph(object): blocker_cache[cpv] = \ blocker_cache.BlockerData(counter, blocker_atoms) if blocker_atoms: - for myatom in blocker_atoms: - blocker = Blocker(atom=portage.dep.Atom(myatom), - eapi=pkg.metadata["EAPI"], root=myroot) - self._blocker_parents.add(blocker, pkg) + try: + for atom in blocker_atoms: + blocker = Blocker(atom=portage.dep.Atom(atom), + eapi=pkg.metadata["EAPI"], root=myroot) + self._blocker_parents.add(blocker, pkg) + except portage.exception.InvalidAtom, e: + depstr = " ".join(vardb.aux_get(pkg.cpv, dep_keys)) + show_invalid_depstring_notice( + pkg, depstr, "Invalid Atom: %s" % (e,)) + return False for cpv in stale_cache: del blocker_cache[cpv] blocker_cache.flush()