diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-01 21:17:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-01 21:17:32 +0000 |
commit | dbf0b9ca3ca89cc14941f646735e987044cd2f8f (patch) | |
tree | bf7b8eec0abd9700e493038ff4e90fc77825e2e9 | |
parent | 3ad44074411171205a34142c9932927404f42593 (diff) | |
download | portage-dbf0b9ca3ca89cc14941f646735e987044cd2f8f.tar.gz portage-dbf0b9ca3ca89cc14941f646735e987044cd2f8f.tar.bz2 portage-dbf0b9ca3ca89cc14941f646735e987044cd2f8f.zip |
Bug #239272 - Handle InvalidAtom exception inside
depgraph.validate_blockers().
svn path=/main/trunk/; revision=11604
-rw-r--r-- | pym/_emerge/__init__.py | 14 |
1 files changed, 10 insertions, 4 deletions
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() |