Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531552 - media-libs/mesa: rename USE sysfs to USE udev
Summary: media-libs/mesa: rename USE sysfs to USE udev
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-03 16:57 UTC by Nikoli
Modified: 2014-12-08 19:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2014-12-03 16:57:55 UTC
USE sysfs was added for fixing bug #516470 for building mesa in systems without udev. So why is it called sysfs and not udev? If user wants to build packages without udev support, he disables USE 'udev' in his make.conf. A lot packages already have USE udev and only mesa has USE sysfs:
$ eix -U '^udev$' --only-names|wc -l
56

$ eix -U '^sysfs$' --only-names|wc -l
1

Enabling sysfs for disabling udev dependency is far from obvious and needs changing package.use, also USE sysfs (with entirely different meaning) was enabled by default in profiles:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/profiles/releases/make.defaults?r1=1.2&r2=1.3
So some users still can have it enabled if they copied it to make.conf.
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-12-03 17:36:19 UTC
sysfs is what upstream uses as configure parameter. It might be a good idea to rename this to udev indeed.
Comment 2 Matt Turner gentoo-dev 2014-12-03 19:17:34 UTC
I agree. Using udev seems like a good idea, especially since we added this option for people who don't want to use udev, so they'll be using USE=-udev and not USE=sysfs.
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2014-12-04 13:28:42 UTC
I think this all boils down to whether or not the sysfs support is considered a mainstream alternative to libudev support.  USE="-*" will force-off udev support too, after all.

To be honest, I think that if libudev support really is fully optional, then we chould just turn it off on linux all the time and force --enable-sysfs via USE="kernel_linux".  I didn't take that as the case, though, which is why I think making libudev support a required dep unless this non-global flag is set, is the best method for now.
Comment 4 Rafał Mużyło 2014-12-04 19:57:06 UTC
Actually, it's bit misleading as both 'udev' *and* 'sysfs' (if the later means "use something other than udev to do foo").

useflags should be about functionality.

The useflag should be saying clearly, that it implements that functionality.
Perhaps something like 'foo-udev'+ 'foo-sysfs' (and a REQUIRED_USE meaning they're exclusive) or if one must be set, only one of them, but one clearly saying it implements the functionality via foo1, instead of foo2.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-12-04 20:02:17 UTC
I think it is ok to name the flag "udev" if it can be described as "use udev rather than sysfs to implement foo".
Comment 6 Rafał Mużyło 2014-12-05 10:00:26 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #5)
> I think it is ok to name the flag "udev" if it can be described as "use udev
> rather than sysfs to implement foo".

The part I strongly disagree about is "...instead...".
The common use of 'udev' useflag is "use udev to implement foo".
It's one thing if - for example - you've got both 'mysql' and 'postgresql' useflags, as it's pretty clear they're connected, here we're talking about another *global* useflag, so any side effect is pretty an unexpected one.

I think if you left it as 'udev', you'd need to add another one for sysfs and make them REQUIRED_USE exclusive, to force users to check the ebuild to learn about the side effect.
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-12-05 10:14:58 UTC
The effect of the udev flag as proposed in comment #0 would be:
When enabled, use udev for PCI identification, makes the package depend on udev (both Gentoo and upstream default).
When disabled, use sysfs for PCI identification, makes the package not depend on udev.
I don't think this has unexpected side effects.

Having both sysfs and udev flags to control the same thing seems not like the best solution (although not without precedent, sys-devel/gcc had both "cxx" and "nocxx" flags for some time).

The proper alternative would be a USE_EXPAND like DEVICE_IDENTIFICATION="sysfs udev", which I think is more confusing than helpful.
Comment 8 Rafał Mużyło 2014-12-05 21:06:14 UTC
The precedent is bug 438700.

> When disabled, use sysfs for PCI identification, makes the package not depend on udev.

> USE flags are categorised as either local or global. A global USE flag must satisfy several criteria:
>
>    It is used by many different packages, at least 5 seems to be agreed upon.
>    It has a general non-specific purpose.

> udev - Enable virtual/udev integration (device discovery, power and storage device support, etc)

Yes, there are local variations, but not really of the 'instead' type.

The other precedent is gnome-base/gvfs - till Gnome 2 removal, it had 'udisks' (for udisks2) and 'gdu' (for udisks1).

The enabled 'udev' useflag would have *almost* the expected result, disabled, however, not really.

Also, honestly, how many people check alternate meanings of a *global* useflag ?
Comment 9 Matt Turner gentoo-dev 2014-12-08 19:00:04 UTC
I've replaced the sysfs USE flag with udev so that 10.2.8 stabilization can proceed.

We can continue debating the merits of one flag vs both.