Alexey Mishustin posted on Sat, 24 Jan 2015 21:54:06 +0400 as excerpted:

> 2015-01-20 14:42 GMT+04:00 Róbert Čerňanský <ope...@tightmail.com>:
>>
>> I somehow thought that edit the overgrowing package.use
>> file upon each emerge world annoys anyone the same as me.
> 
> But for me this is one of the most useful and convenient options in
> Gentoo. Yes, I do edit package.use almost every emerge world. And I like
> to do it. And I don't want to delegate this right to any program -
> portage, or any other.

Agreed that I don't want to (and won't) delegate that decision, but 
almost every emerge world?  Not here.  So ???

I do edit package.use (or my global USE flags) occasionally, but not as 
often as the above implies.  What might I be doing different?  Well, 
here's what I do:

1) I try to sync and update deep newuse @world once a week, tho sometimes 
it's every two weeks (but sometimes it's daily).  I suppose if people 
only get to it every couple months, they'll have more updates to do, and 
within that time yes, I guess it's pretty likely they'll have a few USE 
flag changes to work thru.

So maybe it's simply that I update frequently enough, tho I /do/ run 
~arch as well, which changes much faster than stable, and I even run some 
packages (mostly kde) from the overlays, before they even enter the main 
tree, so I'd /think/ every couple months updating stable would be like 
every week or two updating ~arch.

2) My global USE= starts with -*.  I got tired of worrying about what the 
profiles set, and what individual package IUSE-defaults were doing, so I 
simply set -* so everything would default to off like it USED to do, 
years ago, and I can turn on what I want/need when I decide I want/need 
it.  So if it's on, I turned it on.

3) I don't normally distinguish between local and global USE flags.  I 
normally treat them all as global and set them globally in my make.conf 
use file[1].  When I encounter a new USE flag, because of the -* in USE, 
it's off by default.  If I decide I want it off, no problem, it's off.  
If I decide I want it on, I run an equery hasuse <flag> to see if any 
other package uses it.  If nothing else uses it, I simply set it globally 
in my use file, turning it on for that package and anything else that 
might use it in the future.  If I want it on for the new package but 
something else uses it I obviously had it off for it before or it'd 
already be turned on in the use file, so I decide if I want to change the 
default to on or not.  If so, it goes in the use file.  If not, I have to 
decide if I REALLY want it on for the new package or not, and if so, I 
set a non-default entry in a package.use file.

Similarly, if I encounter a new USE flag that's on already, obviously 
some other package I use is already using it and the entry is in my use 
file or it wouldn't be on already, due to the -* in that use file.  
That's a strong hint what I'm likely to want the default to be.  If I 
decide I want it off anyway, I run an equery hasuse <flag> and check how 
many packages I have with it, and decide what I want the default to be 
based on that.  Only if I want a setting that's different than my 
default, will I put a new entry in my package.use files.

So for all flags, if I want the default off, due to the -* in my use 
file, it's off.  If I want the default on, it's in my use file, turning 
it on.

4) The result is that my package.use files contain ONLY non-default 
entries.

When I set such an entry, I prefix a comment line with the date and an 
explanation of WHY the entry needs to be there, different from my normal 
default settings.  Sometimes, it's due to a bug, and a couple versions 
later I can go thru and test with that entry commented, to see if the bug 
is fixed, yet.  Other times it's due to a use-dep from some other package 
I have installed.  Both qt and kde tend to have explicit use-deps for 
some of their dependencies, and I'll explain that in the comment.

Regardless of why it's there, however, because only non-default entries 
are in package.use, they're the obvious exception.  And as exceptions, 
they don't tend to change that often. =:^)  Generally, they'll only 
change with a major version bump -- say for the upcoming kde5[2], which 
I've already tried a couple times so have some of the flag changes I'll 
need for it made already.  Or sometimes they'll change if I unmerge a 
package that had a use-dep, and with it removed, I can remove my 
exception for that and get back to my normal defaults.

5) Because all my USE flag defaults are set in my global use file, and 
package.use contains only exceptions, organizing my package.use files by 
use flag makes more sense than the usual by-package organization.  So 
(with one exception) all my package.use files are named by flag, not by 
package, with all entries in a file being the same flag, but for 
different packages.

Further more, I name the file based on whether I'm turning the flag on or 
off.  In ordered to have all the per-package-turn-offs (where the default 
is on) sort first, I use a 0-* naming pattern for those.  The others, per-
package-turnons where the default is off, are simply named after the flag 
without the 0-*.

The one exception I mentioned is for the ncmpc package, which has several 
very unique flags that will only apply to it, so I do keep those flags 
together and out of my global use file.  It's named zzpkg-ncmpc to keep 
it last in the listing.

A partial listing, then...

$ cd /etc/portage/package.use
$ ls
0-bindist
0-curl
0-custom-cflags
...
binary
crypt
doc
...
zzpkg-ncmpc

I have bindist turned on by default, with an entry in my global use file, 
but turn it off in specific cases, so we have 0-bindist.  curl is 
similarly on by default, but it's off for systemd, which uses it for 
journal-upload, which I don't want/need, thus that file.

I have binary and crypt and doc off by default (not in my use file, 
ensured off no matter the profile or package use-default setting by the
-* in my global use file), but have them turned on for specific packages, 
thus those files.

And I explained zzpkg-ncmpc above...


So for a new installation until my package and USE flag lists settle 
down, I'd expect frequent changes, and I'd expect a bunch of changes when 
I install a major version bump of something big like kde5, or for other 
big changes like when I switched to systemd and changed a bunch of 
packages and USE flags as a result.

But other than that, they don't change that much; certainly not almost 
every update.

Yes, almost every update there's a handful of packages with new use 
flags.  And I always check them out and decide what I want to do with 
them.  But most of the time, I already have a default entry for the flag 
in my global use file, and most of the time I want to keep that default, 
so no changes necessary on my end.

So what's different between that and whatever others are doing such that 
they have package.use changes nearly every update?  I don't know, but 
whatever it is, I'm glad I'm doing the above, and it's not so often, here.

---
Footnotes:

[1]  My make.conf file itself is simply a list of include <file> lines, 
one for each type of setting.  So I have a use file that contains my USE= 
setting, with a line sourcing it in make.conf, not a USE= line in 
make.conf itself.

[2] KDE5.  I've actually already tried it a couple times and have many of 
the USE flag changes for it already made as a result.  But kwin was still 
crashing on my graphics hardware/drivers when I tried, so I didn't get 
far, and because it's not possible to have both it and kde4 installed at 
the same time, I had to unmerge it to get back to a working kde4.  I 
should try again one of these days as it has been a few months, and qt5 
is actually in the tree now altho I don't believe it's unmasked yet, but 
at least /that/ part should be considerably more stable than it was, when 
I was having to install it from the qt overlay.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply via email to