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

Bug 200385

Summary: portage should apply USE flags from all matching lines in package.use
Product: Portage Development Reporter: kavol
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 216231    

Description kavol 2007-11-26 10:34:19 UTC
Hello,

I just came to a problem using /etc/portage/package.use

Because of some qt apps I have set this line within the file:
>=x11-libs/qt-4                 qt3support

Now I am playing with KDE 4 and kdebase svn version needs qt compiled with 'accessibility' flag enabled, so, naturally I have added a line:
x11-libs/qt                     accessibility

However, this did not work, the 'accessibility' flag was not applied, I had to merge these two lines. From my POV, I consider this to be an error, IMO the flags should be merged, and in case of any collisions the last occurence of any particular flag matching the package & version in question, either setting or unsetting the flag, should be valid.

My use case for having the flags split is to have a better overview of them - for each flag I have a comment which package requires this flag to be set/unset, so after kdebase stops to need 'accessibility' I would simply remove the comment and the following line.

But based on my experience of actual behaviour described above, I can imagine an example when you want to have some USE flags set for qt3, some for qt4 and some common - but if you would have qt4 rule and the qt rule, the common qt rule would not get applied. (Setting the common flags within make.conf is not an option, e.g. for 'debug', usually you do not want to have it globally enabled ...)

Reproducible: Always

Steps to Reproduce:
1. put into /etc/portage/package.use these:
>=x11-libs/qt-4                 qt3support
x11-libs/qt                     accessibility
2. make sure you do not have 'accessibility' enabled within the global scope
3. emerge -pv qt

Actual Results:  
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-libs/qt-4.3.2  USE="cups dbus gif jpeg opengl png qt3support ssl tiff zlib -accessibility* -debug -doc -examples -firebird -glib -mng -mysql -nas -nis -odbc -pch -postgres -sqlite -sqlite3 -xinerama" INPUT_DEVICES="-wacom" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


Expected Results:  
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-libs/qt-4.3.2  USE="accessibility cups dbus gif jpeg opengl png qt3support ssl tiff zlib -debug -doc -examples -firebird -glib -mng -mysql -nas -nis -odbc -pch -postgres -sqlite -sqlite3 -xinerama" INPUT_DEVICES="-wacom" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2008-03-20 18:14:54 UTC
This is supposed to be fixed in portage-2.2_pre5 or earlier.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2008-03-20 18:15:39 UTC
This is supposed to be fixed in portage-2.2_pre5 or earlier.
Comment 3 kavol 2008-11-14 13:25:48 UTC
hm, the notification e-mail somehow slipped through ... so, a bit late thanks, it works for me now!