Lines 1661-1670
Link Here
|
1661 |
xfrom = '(dependency required by '+ \ |
1660 |
xfrom = '(dependency required by '+ \ |
1662 |
green('"%s"' % myparent[2]) + \ |
1661 |
green('"%s"' % myparent[2]) + \ |
1663 |
red(' [%s]' % myparent[0]) + ')' |
1662 |
red(' [%s]' % myparent[0]) + ')' |
|
|
1663 |
|
1664 |
""" This code attempts to determine more accurately |
1665 |
where in the depstring the problem lies. At present |
1666 |
if the problem is in an || depstring the entire || |
1667 |
depstring will be printed; in all other cases the |
1668 |
unmatched atom will be found instead.""" |
1669 |
|
1670 |
# Paren reduce, remove use? conditionals, relist || constructs |
1671 |
atoms = portage.dep.paren_reduce( depstring ) |
1672 |
atoms = portage.dep.use_reduce( atoms, myuse ) |
1673 |
atoms = portage.dep.dep_opconvert( atoms ) |
1674 |
|
1675 |
missing_atom = xinfo.strip("\"") |
1676 |
unsatisfied = [] |
1677 |
# If it's a list, see if the missing atom is in it, otherwise |
1678 |
# see if the atom we are processing matches the missing atom. |
1679 |
# Terminate when you find a match (first match wins) |
1680 |
for atom in atoms: |
1681 |
if isinstance( atom, list ): |
1682 |
if missing_atom in atom: |
1683 |
unsatisfied = atom |
1684 |
break |
1685 |
elif isinstance( atom, str ): |
1686 |
if missing_atom == atom: |
1687 |
unsatisfied.append( atom ) |
1688 |
break |
1689 |
# unsatisfied is used below when printing errors |
1664 |
alleb = portdb.xmatch("match-all", x) |
1690 |
alleb = portdb.xmatch("match-all", x) |
1665 |
if alleb: |
1691 |
if alleb: |
1666 |
if "--usepkgonly" not in self.myopts: |
1692 |
if "--usepkgonly" not in self.myopts: |
1667 |
print "\n!!! "+red("All ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.") |
1693 |
print "\n!!! "+red("All ebuilds that could satisfy ")+green(str(unsatisfied))+red(" have been masked.") |
1668 |
print "!!! One of the following masked packages is required to complete your request:" |
1694 |
print "!!! One of the following masked packages is required to complete your request:" |
1669 |
oldcomment = "" |
1695 |
oldcomment = "" |
1670 |
for p in alleb: |
1696 |
for p in alleb: |
Lines 1680-1689
Link Here
|
1680 |
print "For more information, see MASKED PACKAGES section in the emerge man page or " |
1706 |
print "For more information, see MASKED PACKAGES section in the emerge man page or " |
1681 |
print "refer to the Gentoo Handbook." |
1707 |
print "refer to the Gentoo Handbook." |
1682 |
else: |
1708 |
else: |
1683 |
print "\n!!! "+red("There are no packages available to satisfy: ")+green(xinfo) |
1709 |
print "\n!!! "+red("There are no packages available to satisfy: ")+green(str(unsatisfied)) |
1684 |
print "!!! Either add a suitable binary package or compile from an ebuild." |
1710 |
print "!!! Either add a suitable binary package or compile from an ebuild." |
1685 |
else: |
1711 |
else: |
1686 |
print "\nemerge: there are no ebuilds to satisfy "+green(xinfo)+"." |
1712 |
print "\nemerge: there are no ebuilds to satisfy "+green( str(unsatisfied) )+"." |
1687 |
if myparent: |
1713 |
if myparent: |
1688 |
print xfrom |
1714 |
print xfrom |
1689 |
print |
1715 |
print |