Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 480664

Summary: sys-power/nut should declare NUT_DRIVERS IUSE
Product: Gentoo Linux Reporter: Alexander Bezrukov <phmagic>
Component: [OLD] Core systemAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: itumaykin+gentoo, prometheanfire, saintdev
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: The patch which declares IUSES for ups drivers in nut
Similar patch for nut-2.6.5-r1.ebuild

Description Alexander Bezrukov 2013-08-11 19:33:40 UTC
Created attachment 355710 [details, diff]
The patch which declares IUSES for ups drivers in nut

The sys-power/nut ebuilds depends on NUT_DRIVERS environment variable but doesn't declare the set of IUSE's (making it impossibly to automatically rebuild the package when the variable changes). This also makes users unaware of its existence because it is not shown in eix and emerge -pv outputs.

The NUT_DRIVERS variable serves the same purpose for sys-power/nut as VIDEO_DRIVERS for x11-base/xorg-drivers.

I suggest:

1. rename NUT_DRIVERS to UPS_DRIVERS, the latter reads more generic system-wide.

2. include UPS_DRIVERS to USE_EXPAND. This would require discussion on gentoo-dev@gentoo.org.

3. declare these IUSES in the ebuild. The latter (without renaming NUT_DRIVERS to UPS_DRIVERS) is done in the patch I am attaching to this bug.
Comment 1 Alexander Bezrukov 2013-08-11 19:38:51 UTC
Sorry about many typos. Of course I meant VIDEO_CARDS, not VIDEO_DRIVERS.
Comment 2 Alexander Bezrukov 2013-08-14 01:08:50 UTC
Created attachment 355928 [details, diff]
Similar patch for nut-2.6.5-r1.ebuild
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-01-05 20:36:27 UTC
InCVS, with UPS_DRIVERS, but locally defined.
Comment 4 Nathan Caldwell 2014-01-08 02:35:41 UTC
Just wondering why this was done locally and not as a USE_EXPAND? It makes it a little bit unwieldy when you want to, for example, disable all usb drivers.

Instead of make.conf:

UPS_DRIVERS="-usbhid-ups -bcmxcp_usb -tripplite_usb -blazer_usb -richcomm_usb -riello_usb -nutdrv_qx"

You end up with package.use:

sys-power/nut -ups_drivers_usbhid-ups -ups_drivers_bcmxcp_usb -ups_drivers_tripplite_usb -ups_drivers_blazer_usb -ups_drivers_richcomm_usb -ups_drivers_riello_usb -ups_drivers_nutdrv_qx
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-01-08 02:46:43 UTC
saintdev: because I wanted it to be working and tested before making it global via USE_EXPAND, because that means asking all of the -dev list for USE_EXPAND permission ;-). I did name it ups_drivers_* on purpose, for when USE_EXPAND is ready.
Comment 6 Nathan Caldwell 2014-01-08 02:49:33 UTC
Awesome! I was hoping that was the plan. Thanks for the quick response.
Comment 7 Coacher 2014-09-09 09:23:36 UTC
Please add USE_EXPAND support. Disabling, say, serial drivers is quite troublesome via USEs (as already was mentioned by Nathan).