Handle InvalidDependString in _package_cache.__setitem__(). (trunk r10648)

svn path=/main/branches/2.1.2/; revision=10649
diff --git a/bin/emerge b/bin/emerge
index b7a3c15..db69859 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -5747,10 +5747,13 @@
 		def __setitem__(self, k, v):
 			dict.__setitem__(self, k, v)
 			root_config = self._depgraph.roots[v.root]
-			if visible(root_config.settings, v) and \
-				not (v.installed and \
-				v.root_config.settings._getMissingKeywords(v.cpv, v.metadata)):
-				root_config.visible_pkgs.cpv_inject(v)
+			try:
+				if visible(root_config.settings, v) and \
+					not (v.installed and \
+					v.root_config.settings._getMissingKeywords(v.cpv, v.metadata)):
+					root_config.visible_pkgs.cpv_inject(v)
+			except portage_exception.InvalidDependString:
+				pass
 
 class RepoDisplay(object):
 	def __init__(self, roots):