Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
better use of USE flags during installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bigbangnet
Apprentice
Apprentice


Joined: 11 Jun 2007
Posts: 174

PostPosted: Wed Apr 25, 2012 2:50 am    Post subject: better use of USE flags during installation Reply with quote

Hello,

I installed gentoo using the handbook at one time...well some time ago. But after a while and some tries and some reading here and there on the forum, I've noticed that some people really tweak there Gentoo installation using the USE flags. When I last installed it, I almost used the USE flags in make.conf (global USE flag). Because of that, I believe my system is not..."skinny" if I must say.

Just for kicks, fun and of course education, would there be a noticeable difference (in HHD space used, computer performance, etc) if I reinstalled Gentoo using /etc/portage/package.use ?
_________________
I'm a noob, be gentle with me. TEACH ME
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Wed Apr 25, 2012 3:35 am    Post subject: Reply with quote

bigbangnet,

I don't know how much of a noticeable difference you'll see with disk usage and performance, but it will definitely help in minimizing emerge conflicts.

Early on I suffered from irrational exuberance with use flag settings in make.conf. Since I cleaned them out and made better use of package.use, the conflicts have abated.

Good Luck :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Wed Apr 25, 2012 4:05 am    Post subject: Re: better use of USE flags during installation Reply with quote

bigbangnet wrote:
... if I reinstalled Gentoo using /etc/portage/package.use ?


Not necessarily. remove all extraneous use flags from make.conf. Run emerge -pN world and update package.use according to flags you want to keep on a per package basis. When you are satisfied run emerge -N world followed by emerge -c to clean up the extra dependencies that are now unneeded.

this is a good website to help you decide what to keep in make.conf and what get rid of
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 888
Location: Germany

PostPosted: Wed Apr 25, 2012 5:31 am    Post subject: Reply with quote

It's definitely a good idea to manage the use flags in package.use mostly. As BillWho said, it might help avoiding conflicts during world updates and sometimes use flags get dropped from certain packages, which would result in having to use package.use to specify "-<insertuseflaghere>" anyway.
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Wed Apr 25, 2012 5:51 am    Post subject: Reply with quote

set your profile correctly, and sparingly use global USE flags in make.conf - that's my general strategy

-the profile handles the must-haves (eselect profile list && eselect profile set <foo> && env-update && source /etc/profile)
-make.conf handles the "i dont want anything to ever, in any circumstance, NOT have this support where available"
-package.use is for *enabling* things on a per-package basis, since make.conf/profile have handled the real important stuff

the topic is of course very subjective
as to how much of a benefit you get out of it? Generally means you end up pulling down fewer dependencies. At runtime, the chances of the app itself running noticeably faster are very low in most cases, though theoretically fewer runtime dependencies means less to mmap() means less memory. The real savings to be found is in disk space, from the pulling down of fewer dependencies, less system clutter.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Wed Apr 25, 2012 3:54 pm    Post subject: Reply with quote

dont forget that sometimes features and such get added to packages also, and having the use flag in make.conf will apply those new flags since they are being active system wide, however theres drawbacks as previously mentioned. Also do not forget that each flag you remove from make.conf without supplying it in package.use will removing a function or feature from that application.

also dont forget that there is a heirarchy of use flags depending where they are defined

first considered is the flags set inside your profile
next considered is the flags set within make.conf, make.conf will override your profile
next considered is package.use, will override both make.conf and your profile
last considered is defining use flags at the commandline , this will override everything, however unlike the others changes made here are not saved beteween instances of emerge

so if your package.use contains all the flags you removed from make.conf in each package you have installed that uses those flags individually you will make 0 changes to the packages of your system, and thus emerge --newuse world would do nothing.
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 439
Location: Maryland, US

PostPosted: Sun May 27, 2012 4:27 am    Post subject: Reply with quote

Is there a tool, or easy method, to remove make.conf USE flags which are not needed, or are duplicates of the profile USE flags?
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Sun May 27, 2012 4:08 pm    Post subject: Reply with quote

jasn wrote:
Is there a tool, or easy method, to remove make.conf USE flags which are not needed, or are duplicates of the profile USE flags?


Use eix-test-obsolete from app-portage/eix (you will have to update the eix cache first before it tells you anything useful):

Code:
# emerge eix
# eix-update
# eix-test-obsolete b


The last command tells you about duplicate/unnecessary/inconsistent things in the /etc/portage/* configuration files.

Regarding global vs. local use flags: I have a habit of asking portage if a flag is defined globally or locally, and acting accordingly: Global flags -> /etc/make.conf, local flags -> /etc/portage/package.use/*. That is, unless the last method would be too much editing work for my laziness.

Code:
# emerge portage-utils
# quse -D udev
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6749

PostPosted: Sun May 27, 2012 5:54 pm    Post subject: Reply with quote

Apheus wrote:
Use eix-test-obsolete

eix does not support useflags properly.

What you can do to find duplicates of profile and make.conf is to install "useflags" from the mv overlay (available by layman) and then grep the output for lines containing "default" and "make.conf" but not "minus".
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Sun May 27, 2012 6:03 pm    Post subject: Reply with quote

mv wrote:
eix does not support useflags properly.


Oh, I did not know that, you are right. Sorry for the false info.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Mon May 28, 2012 9:03 am    Post subject: Reply with quote

I tend to add flags to package.use, until too many packages need a specific
flag - then it goes into make.conf. Mostly these are media and file-type flags.
I started with a minimal set in make.conf, and I'm now up to ten or twelve flags.

Will
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon May 28, 2012 11:34 pm    Post subject: Reply with quote

cwr wrote:
I tend to add flags to package.use, until too many packages need a specific
flag - then it goes into make.conf. Mostly these are media and file-type flags.
I started with a minimal set in make.conf, and I'm now up to ten or twelve flags.

Will


same here. pretty well exactly.

When I find I'm continually being blocked from a merge or upgrade by the same USE flag, instead of adding a dozen package.use entries, it gets promoted to make.conf

it takes a good chunk of packages before i care to do that, however. literally about a dozen.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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