Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What is the dominant strategy for setting use flags?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Dippmopser
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2013
Posts: 92

PostPosted: Fri Aug 16, 2013 4:24 pm    Post subject: What is the dominant strategy for setting use flags? Reply with quote

Hello,

being new to gentoo I recently killed my system with faulty USE-Flag settings.

Today I did a reinstall of gentoo, the system is now able to boot, but has no video-card drivers x11 or desktop environment installed.

Before installing those things, which require some modification to my make.conf I wanted to ask, how best to proceed when configuring USE-Flags:

So here is what I think I might have understood so far.

Let's assume I want to set up gnome as a desktop environment.

So I select the gnome profile:

Code:

# eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0 *
  [2]   default/linux/amd64/13.0/desktop
  [3]   default/linux/amd64/13.0/desktop/gnome
  [4]   default/linux/amd64/13.0/desktop/kde



So I choose:

Code:

# eselect profile set 3


I copied those from the handbook - in the real installation the set number differs if I remember correctly, but that is of no concern now, since I opted for the gnome profile.

This profile defines some USE-Flags, based on what the developers think is best for a desktop environment featuring gnome. (correct?)

Trusting in the developers choices, I would like to view the USE-Flags set by this profile - where can I do that?
My intention behind looking at those profile set USE-Flags is:

If a flag is set in the profile, I do not need to configure it in my make.conf. (correct?)

Is there a scenario thinkable (that is somewhat likely to occur) where the profiles states "foo" while make.conf states "-foo"? And which one would take precedence?

Furthermore USE-Flags can be configured in the package.use file.

If I emerge some package like the nvidia-drivers for example they are requesting USE-Flag changes. This is something I faild to understand:

As far as I know, the USE-Flags tell my compiler what options to build in a given peace of software, so I as the user can choose not to compile in the support for something I never need - that is a nice thing.

However, if a certain peace of software cannot run without support for foo, why do I have to set the USE-Flag for foo? - To me it seems like the famous quote by Henry Ford: "The customer may choose any color, as long as the color is black".

So there is not much choice here, except for not installing the software - which makes in case of driver for example little sense to me?! - Maybe someone can elaborate on this matter.

That being as it may, where to best configure a USE-Flag requested by whatever software? - If there is a general answer to this question.

So if a package requests a USE-Flag change, should that be configures globally ore in package.use for just this package?

Furthermore (my last installation ran with KDE), I am unsure how to interpret the wiki:

I am taking dbus as an example to explain what I mean:

[url]
http://wiki.gentoo.org/wiki/D-Bus
[/url]

There are three columns USE-Flag / Default / Recommended

As far as I understand thing, the USE-Flag columns informs me, what USE-Flags a given peace of software is able to use.

So the USE-Flag "squlite" for example is completely irrelevant for dbus no matter if it is set in make.conf or not, dbus will be compiled in the same way (correct?)

Now there is the Default column which in case of dbus lists "x". Does this mean that dbus is compiled with "x" unless my make.conf explicitly forbids it or does it mean something else?

Now in case of dbus there are no recommended USE-Flage, if there where, would that column mean, that it would be a good idea to set them in make.conf ore rather in package.use or something else entirely?

If someone takes the time - many thanks in advance.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Fri Aug 16, 2013 4:34 pm    Post subject: Reply with quote

/etc/portage/make.conf = global stuff, i know every package hitting my system should have the useflag enabled....
/etc/portage/package.use = individual packages use flags... used heavily, if there are many duplicates of a use flag it might get migrated to global. i dont like qt4 on transmission so it gets -qt4 in package.use everything else can have it.....

start lean, then work on bloating your system.
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
Dippmopser
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2013
Posts: 92

PostPosted: Fri Aug 16, 2013 5:38 pm    Post subject: Reply with quote

OK I am about to install the nvidia drivers

media-libs/mesa-9.1.2-r1 is requesting "xa"

x11-libs/libdrm-2.4.15 is requesting "libkms"

Is that something for global configuraiton or rather local?
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 367

PostPosted: Sat Aug 17, 2013 12:51 am    Post subject: Reply with quote

For something like that, I would put an entry like this in /etc/portage/package.use, so that I know why I added those USE flags. Since I don't want or need those flags in general, I add them only for the packages that NVidia-drivers says that it needs them for:

#NVidia-Drivers
media-libs/mesa xa
x11-libs/libdrm libkms
Back to top
View user's profile Send private message
Dippmopser
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2013
Posts: 92

PostPosted: Sat Aug 17, 2013 2:25 am    Post subject: Reply with quote

OK, I've done that.

How do I know if I need a flag in general?

Should one make further and further entries in the package.use and look from time to time if there are dublicates and than move those to general like 666threesixes666 suggested.

I recognize that this is a viable path for Flags that are required per se, but how about other Flags, for example how do I know if I can safely deactivate a flag? Not all of them are selfexplanatory nor do I know if something I might emerge one day would need that special flag.

Or to put it the other way round: Lets assume I disable xa in make.conf, but enable it in package.use for the one package that needs it. Would that work?
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Sat Aug 17, 2013 4:45 am    Post subject: Reply with quote

"How do I know if I need a flag in general?"

it will complain about adding use flags in merges if they are required. sometimes you want non required in.... thats where this becomes handy....

https://wiki.gentoo.org/wiki/BIND#Use_Flags
https://wiki.gentoo.org/wiki/DRBD#Use_Flags
https://wiki.gentoo.org/wiki/Minidlna#Use_Flags

sometimes packages miss features from having some use flags turned off... its up you to brew the system that is correct to you.

as previous poster said, id only alter the package.use for those.
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum