Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543994 - make.conf feature request: USE_ON_DEMAND
Summary: make.conf feature request: USE_ON_DEMAND
Status: RESOLVED DUPLICATE of bug 258371
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-21 09:09 UTC by Michael Mair-Keimberger (iamnr3)
Modified: 2015-03-21 21:36 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 Michael Mair-Keimberger (iamnr3) 2015-03-21 09:09:43 UTC
Hi Portage Team,

I would like to request for a feature which i call USE_ON_DEMAND (just a proposal of course). I couldn't find any similar feature in portage, but if there exist something, please ignore this bug :)

* The problem:
For many years now i'm a happy gentoo user and as such i'm very picky about what gets installed by use flags, which is why i keep my package.use file very clean. My understanding for this file is that users can enable/disable features for any software like they want. 
For example: Want "qrcode" support in electrum? Just do:
echo "net-misc/electrum qrcode" >> /etc/portage/package.use

Since use-dependencies were invented the situation changed a bit. Most of the lines in my package.use file are there because some software needs some use-flag - which is fine of course, but the file gets bloated with things which i would probably enable anyway. I would keep my package.use file simple and also just want package use flags there which _I_ want to enable.

* Workarounds:
A possibility would be enabling those use flags globally. However, the best example, why _not_ doing this is probably "abi_x86_32". I really don't want to have 32bit enabled globally, as every package would have double compile times. However, in my package.use file are now 71 lines which just enable abi_x86_32!
Other examples are the "X" or "python" use flag. Both which are enabled for many package because some package need them. (btw, i'm not using a desktop profile)

I also could play around with different files and move the abi_x86_32 flags in its own file. This would make things a bit more clear. But what if package X doesn't need package Y[abi_x86_32] anymore? From time to time i would have to check if still every package in this file is needed to build for 32bit as well. This is quite annoying and that's why i'm suggesting a new feature!

* The feature:
I suggest a new variable for make.conf which, for example, could be called USE_ON_DEMAND.
Like the simple "USE" variable it would enable use flags globally. However only if a given package would need it (use dependency)

For example:
I want/need 32bit mesa (for gaming ;) ), thus i'm enabling it via:
# echo "media-libs/mesa abi_x86_32" >> /etc/portage/package.use
Since many package would need now abi_x86_32 as well i do also add the flag to USE_ON_DEMAND (since i would enable them anyway)
# echo "USE_ON_DEMAND=\"abi_x86_32\"" >> /etc/portage/make.conf
Now every package would be build with 32bit support _IF_ some package would need it (in my case 32bit mesa).

The same would work with, for example, "X" or "python". Usually i have no problem if packages get build with support for it, but they should only be used if it's needed.
Comment 1 Jason Zaman gentoo-dev 2015-03-21 09:50:46 UTC
This is interesting, I have actually been wanting / thinking about this exact thing for a while now. The way you described it is pretty much exactly how I'd want it to work. Definitely a +1 from me for a feature such as this.
Comment 2 Zac Medico gentoo-dev 2015-03-21 21:36:18 UTC
This is the same thing as "autouse" requested in bug 258371, with USE_ON_DEMAND being a proposed configuration parameter for it.

*** This bug has been marked as a duplicate of bug 258371 ***