Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 347613

Summary: Output more information in case of dependency resolution failures
Product: Portage Development Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: esigra
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300071    

Description Dennis Schridde 2010-12-02 22:50:42 UTC
Some ebuilds need very nasty arch-useflag (e.g. x86) DEPENDs. This seems to stem from their herds experiencing the dependency resolution output of portage to be insufficient, in case it could not work out a way to resolve dependencies of a package.

Hence I propose an output similar to:
---
Unable to resolve dependencies for foo/bar-1, the options were:
xxx/yyy:0
 * xxx/yyy-1 masked by: package.mask
 * xxx/yyy-2 masked by: missing keyword
=aaa/bbb-9*
 * aaa/bbb-9.1 masked by ~x86
 [....]
---

So a little bit like what Debian's Aptitude does: Present multiple solutions to resolve a problem. The user then sees immediately where portage got stuck and can hopefully adjust their /etc/portage files accordingly.

The example assumes that the file foo/bar/bar-1.ebuild would contain:
---
DEPEND="|| ( xxx/yyy:0 =aaa/bbb-9* )"
---
And the files xxx/yyy/yyy-1.ebuild, xxx/yyy/yyy-2.ebuild, aaa/bbb/bbb-9.1.ebuild would exist with abovementioned masks and slots.

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2010-12-02 23:21:34 UTC
Maybe it would help if we added support for package.mask and missing keywords to the emerge --autounmask option? Currently it only supports unstable keywords.
Comment 2 Dennis Schridde 2010-12-03 00:03:04 UTC
My point mainly was that currently it is hard to figure out how portage came to the conclusion that this or that package cannot be emerged.

E.g. what virtual/jdk-1.6.0 does is this:
# Keeps this and java-virtuals/jaf in sync
# The keyword voodoo below is needed so that ppc(64) users will
# get a masked license warning for ibm-jdk-bin
# instead of (not useful) missing keyword warning for sun-jdk
# see #287615
# note that this "voodoo" is pretty annoying for Prefix, and that we didn't
# invent it in the first place!
RDEPEND="|| (
        amd64? ( dev-java/icedtea6-bin )
        x86? ( dev-java/icedtea6-bin )
        [...]
        amd64? ( =dev-java/sun-jdk-1.6.0* )
        x86? ( =dev-java/sun-jdk-1.6.0* )
        [...]
        =dev-java/ibm-jdk-bin-1.6.0*
        [...]
    )"

The arch-useflags look horrible, and prevent testing on other arches. And all that only because it is difficult for users to see the information that helps them.
Comment 3 Dennis Schridde 2010-12-03 00:06:15 UTC
(In reply to comment #2)
> # The keyword voodoo below is needed so that ppc(64) users will
> # get a masked license warning for ibm-jdk-bin
> # instead of (not useful) missing keyword warning for sun-jdk
> # see #287615
This probably refers to bug #287615 comment #16, where portage says that dev-java/icedtea6-bin was masked, but not what other options it found to be insufficient before it arrived there.