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

Bug 56218

Summary: gtk-engines2.eclass eclass violates constant DEPEND QA policy.
Product: Gentoo Linux Reporter: Brian Harring (RETIRED) <ferringb>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED DUPLICATE    
Severity: normal CC: gtaluvit, qa, seemant
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Brian Harring (RETIRED) gentoo-dev 2004-07-06 03:27:03 UTC
Couple of things.
A) no IUSE definition.  This is minor, but needs to be added.

B) this-
# --- define some deps for binary packages
if [ -n "${HAS_GTK1}" -a ! -n "${HAS_GTK2}" ]; then
        DEPEND="${DEPEND} =x11-libs/gtk+-1.2*"
elif [ -n "${HAS_GTK1}" -a -n "${HAS_GTK2}" ]; then
        DEPEND="${DEPEND} =x11-libs/gtk+-1.2* =x11-libs/gtk+-2*"
elif [ ! -n "${HAS_GTK1}" -a -n "${HAS_GTK2}" ]; then
        DEPEND="${DEPEND} >=x11-libs/gtk+-2
fi

is not even remotely valid.  Also is a wee bit odd combined with this-
if ! has_version "x11-libs/gtk+"; then
        DEPEND="gtk2? ( >=x11-libs/gtk+-2 ) !gtk2? ( =x11-libs/gtk+-1.2* )"
        use gtk2 \
                && HAS_GTK2=1 \
                || HAS_GTK1=1
fi

I assume you're after 
DEPEND="gtk2? ( >=x11-libs/gtk+-2 ) gtk? ( =x11-libs/gtk+-1.2* ) !gtk2? ( !gtk? ( =x11-libs/gtk+-1.2* ) )"

although your commentary about the gtk* use flags indicates perhaps you're after something else.

Either way, DEPENDS is an exported key, and needs to be constant a value.
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2004-07-06 05:30:49 UTC
i'm on gnome already, thanks.

anyway, USE="gtk" does not mean USE="gtk1". that is the whole thing we are trying to avoid. if there is a way to detect what gtk's are installed on a user's machine, then please tell me.

otherwise, we'll have to split gtk-engine's as gtk1 and gtk2 ebuilds, which in itself it very ugly, probably as ugly as the eclass right now. comments?
Comment 2 gtaluvit 2004-07-08 06:02:46 UTC
gtk may not mean gtk1, but in the context it's being used, it does.  The detection of gtk1 and gtk2 doesn't work properly anyway.  See bug 38492 (which seriously needs re-statusing).  As for this bug, can't we just go strictly by USE flags and not use library detection?  What does the library detecting gain?
Comment 3 Brian Harring (RETIRED) gentoo-dev 2004-08-26 20:56:48 UTC
This eclass is *still* using a conditional dep via has_gtk1.  This *needs* to be taken care of, not ignored for a month.
Comment 4 foser (RETIRED) gentoo-dev 2004-08-28 02:27:08 UTC

*** This bug has been marked as a duplicate of 24439 ***