When I try to emerge xscreensaver-4.10 with use-flags "-gtk gtk2" then it wants to build also: dev-libs/glib-1.2.10-r5 x11-libs/gtk+-1.2.10-r10 gnome-base/ORBit-0.5.17 gnome-base/gnome-libs-1.4.2 media-libs/gdk-pixbuf-0.22.0 When I try to emerge xscreensaver with use-flags "gtk gtk2" then it doesn't want to build no one above package. Reproducible: Always Steps to Reproduce: 1. Get system where installed only >gtk+-2* 2. USE="-gtk gtk2" emerge -pv xscreensaver Actual Results: emerge tries to make gtk+-1.4.* Expected Results: emerge don't tries to make gtk+-1.4.* Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r2) ================================================================= System uname: 2.4.20-gentoo-r2 i686 AMD Duron(tm) Processor GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 apm avi crypt cups encode foomaticdb gif java jpeg libg++ libwww mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xv zlib gdbm berkdb slang readline bonobo svga guile sdl tcpd pam ssl perl python imlib oggvorbis motif opengl mozilla gtk2 gnome alsa 3dnow -X -kde -qt -arts -esd -oss -aalib -gtk -gpm -xmms" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=athlon -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-mcpu=athlon -O2 -pipe -fomit-frame-pointer" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
-gtk +gtk2 is not a supported combination of USE flags. if you read the use flag description for them, gtk means general GTK+1.2 or GTK2 support. gtk2 is used to select GTK+2 in the presences of a choice between the two. So you should always be setting USE="gtk gtk2" if you want to have a GTK+2 environment.
It sounds strange for me: there are applications that have optional "gtk" support and don't have "gtk2" support. If I want to have only gtk2 environment and my make.conf include USE="gtk gtk2" than glib-1.2 and gtk+-1.2 will always build for me. IMHO it's wrong behavior.
if you have to do the extra leg work yourself if you want a gtk2 only environment. my point is: 1. gtk = gtk1 or gtk2 2. gtk2 = in the presence of a choice, choose gtk2 this is used by things like wxGTK, mozilla, some gtk theme engines and xscreensaver. if it was to select gtk1 support, it would have been called "gtk1" rather than "gtk". setting "gtk gtk2" will not force you to install both gtk1 and gtk2. but if an app only has a gtk1 version, then of course it will installed gtk+-1.
> my point is: > 1. gtk = gtk1 or gtk2 > 2. gtk2 = in the presence of a choice, choose gtk2 Possibly this point doesn't so flexible as mine. I'll explain on examples: 1) there are packages in portage, like libdv, that has only gtk1 support and which should be built with 90% percent probability on system. If I have option USE="gtk gtk2" than it always builds gtk1 for me. But it's not what I want. 2) I have programms in gtk1 and gtk2, what should be happened when I try to install theme like bluecurve, which contains themes for both gtk1 and gtk2? As I catch from your point only theme for gtk2 will be installed. So I suggest to use options gtk and gtk2 in next way: 1) if defined only gtk, then build program with gtk1 support. 2) if defined only gtk2, then build program with gtk2 support, nor with gtk1 support. 3) if defined both gtk and gtk2 then, if package has support for both flags and both can be built/installed (e.g for some themes) then both will installed, if package can be built/installed with only one support (gtk1 or gtk2) then gtk2 will be prefered to gtk1. IMHO this scheme is more flexible.
i understand your wishes. but it is just not feasible to suddenly switch the usage of the "gtk" useflag from being a general GTK+ support enabler to specifying GTK+1.2 only. for instance, with libdv, are you saying that if the gui is GTK+1 then don't install it? i don't think the majority of users would like that to happen, especially given that "gtk" is a default useflag and gtk2 is an optional one. speaking on behalf of the gnome team, we're not going to change the usage of these USE flags in the near future.
I don't see any problems to use my schema. > but it is just not feasible to suddenly switch the usage of the "gtk" useflag > from being a general GTK+ support enabler to specifying GTK+1.2 only. What is general GTK+ support? This is not clean for me. If "general GTK+ support" is something not linked with GTK version, then why we can't enable "general GTK+ support" if at least one of gtk, gtk2 use-flags is enabled. > 'libdv' problem if package has optional "gtk" flag, than it can be built with or w/out gtk support. So, if "gtk" use-flag is disabled it should be built w/out gtk support. > "gtk" is a default useflag and gtk2 is an optional one gtk2 grows very much, I think gtk+1.2 will be depreciated in some future. Now you suggest to me to have USE="gtk gtk2" in my make.conf. But in fact what prevent to have USE="-gtk gtk2"? I don't see any problem on this way. If there are packages, that really doesn't allow to use my scheme, please point them. Also if there are a lot of ebuilds that should be rewritten than I can help to do it.
As I've found, currently there are 32 ebuild files which have support for both "gtk" and "gtk2" use-flags. I think it will not hard to review all of them and implement new scheme where it's needed. If nobody is against my suggestion I'll start to work on this, and soon there will apears patches ;-).
this has gone totally off topic, so i'll change the topic.
to draw this to a conclusion, the system works as it is and makes sense. > 1) there are packages in portage, like libdv, that has only gtk1 support and which > should be built with 90% percent probability on system. > If I have option USE="gtk gtk2" than it always builds gtk1 for me. But it's not what > I want. Where do you get the figure libdv is on 90% of the systems? it's a pretty irrelevant lib and mostly comes from gst-plugins deps and that should be fixed with 0.6.2 for the most part. To some extent USE flags manipulation might be needed to get what you want, but that is unavoidable. If it comes with one of the large meta packages (gnome in this case), it is a problem but as said this problem got fixed in gst-plugins-0.6.2 . > 2) I have programms in gtk1 and gtk2, what should be happened when I try to install > theme like bluecurve, which contains themes for both gtk1 and gtk2? Themes are an odd one out case where both gtk1 and 2 versions can be compiled from the same package, to my knowledge that only happens in themes. They have their own eclass which takes pretty good care of this nowadays. No need for changes there. Currently it will install both gtk1 & 2 versions depending on USE flags and existance of the relevant libs. > What is general GTK+ support? This is not clean for me. > If "general GTK+ support" is something not linked with GTK version, then why we can't >... enable "general GTK+ support" if at least one of gtk, gtk2 use-flags is enabled. general gtk+ support is that a package supports some version of GTK+ gui. If you want a gtk+ gui you shouldve set 'gtk' in use. gtk2 should not cover general support, because it's a complementary flag to gtk (as is made quite clear in it's description). > gtk2 grows very much, I think gtk+1.2 will be depreciated in some future. > Now you suggest to me to have USE="gtk gtk2" in my make.conf. But in fact what prevent > to have USE="-gtk gtk2"? I don't see any problem on this way. the gtk2 growth is covered by the gtk USE flag. See, gtk USE covers both versions. If a package needs gtk1 libs and you don't want that, you just have to set specific USE flags there. Portage support for so called 'sticky' USE flags is on the TODO. If you carefully read the description of the gtk USE flags this all shouldve been clear. gtk2 USE flag is _only_ used in packages that support both versions in one package which cannot be parallel installed. I don't say in retrospect this couldnt have been handled better, but there is no reason to change it now. For a possible gtk3 we might have to rethink the approach to packages with multiple GUI versions if only to cirumvent confused user bugs like this (no offense), you aren't the first who brought this up (tip for next time, search for similar bugs and read comments and reasoning there, wouldve saved us time probably). So i wouldn't start 'fixing' packages as you mentioned in #7 I want to close this one, anything more you want to add ?
> If a package needs gtk1 libs and you don't want that, you just have to set > specific USE flags there. Portage support for so called 'sticky' USE flags > is on the TODO. Yes, 'sticky' USE flags will solve the problem. But there is little reef: 1) I search all packages that has support to gtk1 only and add sticky flag for them. 2) I expect that "emerge sync; emerge -u world" will not build gtk+-1.2. But it's not true, because in portage new package with gtk1 support can appears and it can be installed by depends. I agree that this problem should not be fixed 'right now', it doesn't break functionality. This bug is enhancement. If there will be dicision to fix it, I'll help to do it, otherwise it can be closed.
well for both 1) and 2) it is a given that we do not recommend a 'world' emerge without a 'pretend' run first to check which packages get installed. There is some responsibility on the user side here. closing as agreed upon
*** Bug 28766 has been marked as a duplicate of this bug. ***