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?
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.
can't move on until we have more info
See bug 24439 comment 9.
Created attachment 32010 [details, diff] fix Piotr, try this patch on gtk-engines2.eclass. If it works, reopen the bug, please.
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.
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.
*** Bug 52664 has been marked as a duplicate of this bug. ***
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. :)
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.
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.
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.