Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38492 - gtk-engines2.eclass
Summary: gtk-engines2.eclass
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 52664 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-17 02:18 UTC by Piotr Kaczmarek
Modified: 2004-08-20 08:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix (gtk-engines2.eclass.patch,369 bytes, patch)
2004-05-25 08:50 UTC, Ervin Németh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kaczmarek 2004-01-17 02:18:02 UTC
if has_version "=x11-libs/gtk+-1.2*"; then
        HAS_GTK1=1
        GTK1_ENGINES_DIR=/usr/lib/gtk/themes/engines
fi

even if you don't have gtk+-1.2 it detecs you have
i think it's a bug
anyone who know ebuild functions can look at this?
maybe it's not allowed to use * as argument to this function?
Comment 1 Mike Gardiner (RETIRED) gentoo-dev 2004-01-25 05:37:41 UTC
Unless I'm mistaken, the logic says:

If you have gtk1 installed Then
    set up the variables necessary for the theme to install it's gtk1 parts

I don't quite understand your comment that "even if you don't have gtk+-1.2 it detects that you have" ? Which did this ? Can you provide a log or something ? Because gkt+ versions are slotted, both gtk1 and gtk2 can be installed at the same time. This check, with the =1.2* means, any version that is equal to 1.2.*

Cleared up ? Without further evidence this one is invalid.
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2004-02-04 07:25:33 UTC
can't move on until we have more info
Comment 3 Thomas Arnett 2004-03-08 03:57:43 UTC
See bug 24439 comment 9.
Comment 4 Ervin Németh 2004-05-25 08:50:38 UTC
Created attachment 32010 [details, diff]
fix

Piotr, try this patch on gtk-engines2.eclass.

If it works, reopen the bug, please.
Comment 5 gtaluvit 2004-05-31 18:21:03 UTC
The problem is that if you don't have gtk 1.2 installed, it still sets HAS_GTK1=1 and lists it as a dependency.  Ervin's patch fixes the problem for me.
Comment 6 foser (RETIRED) gentoo-dev 2004-06-01 04:02:58 UTC
well it shouldn't by the looks of it. There is no difference in <gtk+-2 & =gtk+-1.2*

If someone can tell us why this makes a difference it might make more sense to us.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2004-06-01 10:48:42 UTC
*** Bug 52664 has been marked as a duplicate of this bug. ***
Comment 8 gtaluvit 2004-06-01 16:14:09 UTC
Curiouser and curiouser.  I unmerged gtk-engines, removed the patched eclass from the overlay, and then resynced.  After syncing, an emerge -uDav gtk-engines wanted to install GTK 1.2 even though I don't have it.  I then ran the following test ebuild to see what some values were:

KEYWORDS="x86"
 
pkg_postinst()
{
if has_version "=x11-libs/gtk+-1.2*"; then
        echo "=gtk+-1.2* is 1"
else
        echo "=gtk+-1.2* is 0"
fi
 
if has_version "<x11-libs/gtk+-2"; then
        echo "<gtk+-2 is 1"
else
        echo "<gtk+-2 is 0"
fi
}

Both were returned as 0.  Confused, I added an echo to the eclass.  Note: I did NOT change the eclass to <x11-libs/gtk+-2.  I tried running the emerge again for gtk-engines.  This time I got the has_version global warnings people have seen before, but to my surprise, it only wanted to install gtk-engines, NO GTK 1.2.  Confused, I removed the echo so the eclass is right back to its original state, and it still says it doesn't need GTK 1.2.  Just modifying the eclass fixed the issue.  Try explaining that one to me. :)
Comment 9 gtaluvit 2004-06-02 07:04:51 UTC
OK, my test-ebuild doesn't affect anything.  Here's an example of my issue.  After syncing this morning, I do an emerge -uDav world ( I have gtk-engines installed happily btw ) and I get this:

Calculating world dependencies ...done!
[ebuild  N    ] x11-libs/gtk+-1.2.10-r11  -debug -nls  2,880 kB
[ebuild  N    ] media-libs/imlib-1.9.14-r1   574 kB

Total size of downloads: 3,454 kB

Do you want me to merge these packages? [Yes/No] no

I say no, and try my test-ebuild posted above:

>>> Merging gnome-extra/test-ebuild-0.1 to /
=gtk+-1.2* is 0
<gtk+-2 is 0
 * Caching service dependencies...

I try emerge -uDav world again and it still wants gtk 1.2 so calling has_version again didn't affect anything.  I then make the following change to /usr/portage/eclass/gtk-engines2.eclass

if has_version "=x11-libs/gtk+-1.2*"; then
    echo "Hi"
    HAS_GTK1=1

All I did was add the echo.  I then try emerge again:

Calculating world dependencies -has_version() in global scope: x11-themes/gtk-engines-2.2.0
has_version() in global scope: x11-themes/gtk-engines-2.2.0
has_version() in global scope: x11-themes/gtk-engines-2.2.0                    ...done!

Total size of downloads: 0 kB

Nothing to merge; do you want me to auto-clean packages? [Yes/No]

Adding the echo fixed this issue for no good reason.  I then removed the echo, and tried emerge -uDav world two more times:

Calculating world dependencies -has_version() in global scope: x11-themes/gtk-engines-2.2.0
has_version() in global scope: x11-themes/gtk-engines-2.2.0
has_version() in global scope: x11-themes/gtk-engines-2.2.0                    ...done!

Total size of downloads: 0 kB

Nothing to merge; do you want me to auto-clean packages? [Yes/No]

-----------------

These are the packages that I would merge, in order:

Calculating world dependencies ...done!

Total size of downloads: 0 kB

Nothing to merge; do you want me to auto-clean packages? [Yes/No]


So, just modifying the eclass seems to fix the issue.  Not only that but it almost seems like it gets cached since the first time after changing, it yells about has_version, but doesn't do that subsequently.  I'm wondering if the first time that eclass gets hit with has_version, it returns 1 for some reason, but after an edit, some order for caching gets changed and it returns the proper value.
Comment 10 gtaluvit 2004-06-03 08:24:58 UTC
No thoughts on this as of yet?  I'm wondering if this should be reassigned to the portage folks instead of gnome.  The issue is in the eclass not behaving consistently due to superfluous edits, not gnome-specific logic.  This should also be reopened, not resolved needinfo.
Comment 11 Marien Zwart (RETIRED) gentoo-dev 2004-08-20 08:52:19 UTC
This is probably a duplicate of bug 24439 (which is currently reopened). The issue is that the dependency info is cached, and after an emerge sync you get the wrong cache information. If you touch the ebuild the cache info is recalculated.