Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157998 - rename USE=X to USE=test in virtualx.eclass
Summary: rename USE=X to USE=test in virtualx.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Other
: High normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 165592 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-13 01:38 UTC by Mike Kelly (RETIRED)
Modified: 2009-10-19 21:23 UTC (History)
4 users (show)

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


Attachments
patch for virtualx.eclass (virtualx.eclass.diff,1.26 KB, patch)
2009-10-17 17:12 UTC, Jonathan Callen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kelly (RETIRED) gentoo-dev 2006-12-13 01:38:55 UTC
Currently, x11-libs/gtk+ pulls in x11-base/xorg-server or virtual/x11 if USE="X". This is because of the virtualx.eclass, which is just used for running src_test().

On a remote server, it's kinda silly to pull in the whole xorg-server just because you're installing, say, xchat.

I think that most ebuilds that use the virtualx.eclass only need it for running tests, but I'm not sure. If so, would it make more sense for that DEPEND to be conditional upon the "test" flag instead?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-13 02:01:19 UTC
Uhm, what's exactly the problem here? Hint:

echo "x11-libs/gtk+ -X" >> /etc/portage/package.use

And with this whole USE=test thing, we are back to Bug 142919 which went nowhere.
Comment 2 Mike Kelly (RETIRED) gentoo-dev 2006-12-13 02:46:52 UTC
Well, the description of the X use flag is:
  Adds support for X11

That doesn't really imply requiring an x11 server be built, just that it'll need to link against some X11 libraries.

Also, in the case of gtk+, having an X use flag makes little sense, since you'll always build it against X11 libraries.

Yes, Jakub, I know I can just disable the X flag for this package. But, that misses the point that this use of the flag doesn't really meet with what the flag is used for everywhere else in the tree.

I propose an "build-with-x-server" global use flag (name could be better). It should default to on for desktop profiles. Packages that need this support only for doing src_test stuff (which I suspect is the vast majority of them), should just check for that flag in src_test and just not run the tests if it isn't enabled. If there are any packages that really need this stuff to build their main code, they should have it forced on in package.use.force.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-12-13 02:56:24 UTC
Oh noes, why do we need yet another use flag for stuff that needs X server for running tests? The whole FEATURES="test" USE="test" thing isn't messy enough as it is? :S 

If you really can't live with this trivial annoyance, then switch the flag to test instead of X as suggested originally (still sucks because USE=test plain doesn't make sense, but suck way less than inventing new flags for tests).
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-02-06 12:03:10 UTC
*** Bug 165592 has been marked as a duplicate of this bug. ***
Comment 5 Luca Barbato gentoo-dev 2007-02-06 16:26:48 UTC
Please do not abuse virtualx in such way (I'm getting more and more packages with that issue)

gnome-base/libgnomecanvas
gnome-base/libbonoboui
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-02-18 00:28:19 UTC
Uh, so why don't we just change USE=X to USE=test in the eclass and be done with it? Changing summary, someone do it and close this bug, azarah has been MIA for ages.
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-10-27 10:40:16 UTC
ok this is not that simple because this eclass has functions for the configure phase. The export the proper DEPEND we would need to know in advance which function will be called.

After a little review of the tree, it appears that besides gnome which uses this eclass for src_test only (afaik), the ebuilds importing it are :

app-crypt/heimdal                  used in src_test
app-text/tetex                     used in src_test
app-text/texlive                   used in src_test
dev-tcltk/otcl                     used in src_test
media-sound/listen                 used in src_compile and src_install
                                   need to check if it's actually needed
media-sound/museseq                used for configure (need to check that too)
dev-util/portatosourceview         not used at all (meh ?)
xfce-base/thunar                   used in src_test
x11-libs/guile-gtk                 used in src_test
net-news/straw                     does weird things (and I want it to die anyway)

so if I'm right, that's only 4 packages that would use it for something else than tests.
Comment 8 Saleem Abdulrasool (RETIRED) gentoo-dev 2007-12-13 06:10:40 UTC
why is this assigned to gnome?  this belongs to x folks, passing it along.
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2008-10-28 17:29:59 UTC
http://thread.gmane.org/gmane.linux.gentoo.devel/25179 is the old thread regarding this...

http://thread.gmane.org/gmane.linux.gentoo.devel/58549 is the new thread..

We need a solution. My original solution is starting to look like the only thing viable.
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2009-09-19 23:18:23 UTC
Would renaming USE=X to USE=test satisfy everybody, or am I missing something?

Please let me know, as this bug was started before I cared about X, I've missed the whole debate.

Thanks
Comment 11 Jonathan Callen (RETIRED) gentoo-dev 2009-10-17 17:11:36 UTC
Will be attaching a new patch that fixes the issue for just about everything, so reopening.
Comment 12 Jonathan Callen (RETIRED) gentoo-dev 2009-10-17 17:12:35 UTC
Created attachment 207417 [details, diff]
patch for virtualx.eclass
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-10-18 15:29:30 UTC
Like I said to Jonathan on irc, I'm fine with this patch. Does anyone have anything to say about this patch?

Cheers
Comment 14 Jonathan Callen (RETIRED) gentoo-dev 2009-10-19 21:23:56 UTC
Seeing no objections, I've gone ahead and committed the fix.