Index: emerge
===================================================================
--- emerge	(revision 5834)
+++ emerge	(working copy)
@@ -1661,10 +1660,37 @@
 						xfrom = '(dependency required by '+ \
 							green('"%s"' % myparent[2]) + \
 							red(' [%s]' % myparent[0]) + ')'
+					
+					""" This code attempts to determine more accurately
+					where in the depstring the problem lies.  At present
+					if the problem is in an || depstring the entire ||
+					depstring will be printed; in all other cases the
+					unmatched atom will be found instead."""
+					
+					# Paren reduce, remove use? conditionals, relist || constructs
+					atoms = portage.dep.paren_reduce( depstring )
+					atoms = portage.dep.use_reduce( atoms, myuse )
+					atoms = portage.dep.dep_opconvert( atoms )
+					
+					missing_atom = xinfo.strip("\"")
+					unsatisfied = []
+					# If it's a list, see if the missing atom is in it, otherwise
+					# see if the atom we are processing matches the missing atom.
+					# Terminate when you find a match (first match wins)
+					for atom in atoms:
+						if isinstance( atom, list ):
+							if missing_atom in atom:
+								unsatisfied = atom
+								break
+						elif isinstance( atom, str ):
+							if missing_atom == atom:
+								unsatisfied.append( atom )
+								break
+					# unsatisfied is used below when printing errors
 					alleb = portdb.xmatch("match-all", x)
 					if alleb:
 						if "--usepkgonly" not in self.myopts:
-							print "\n!!! "+red("All ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.")
+							print "\n!!! "+red("All ebuilds that could satisfy ")+green(str(unsatisfied))+red(" have been masked.")
 							print "!!! One of the following masked packages is required to complete your request:"
 							oldcomment = ""
 							for p in alleb:
@@ -1680,10 +1706,10 @@
 							print "For more information, see MASKED PACKAGES section in the emerge man page or "
 							print "refer to the Gentoo Handbook."
 						else:
-							print "\n!!! "+red("There are no packages available to satisfy: ")+green(xinfo)
+							print "\n!!! "+red("There are no packages available to satisfy: ")+green(str(unsatisfied))
 							print "!!! Either add a suitable binary package or compile from an ebuild."
 					else:
-						print "\nemerge: there are no ebuilds to satisfy "+green(xinfo)+"."
+						print "\nemerge: there are no ebuilds to satisfy "+green( str(unsatisfied) )+"."
 					if myparent:
 						print xfrom
 					print