Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cleaning package.use
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
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1735
Location: Mannheim, Germany

PostPosted: Fri Oct 05, 2012 6:45 pm    Post subject: cleaning package.use Reply with quote

Hi!
My /etc/portage/package.use file is getting a bit huge. Most of the time portage complains about necessary useflag changes to build any specific packages, I simply put them into package.use and forget about it. Since I like my system also small-ish, I am really wondering if there is any way to filter out those useflags for unnecessary flags?
Some years ago, someone in this forum provided a nice script which checks useflags in make.conf for obsolete stuff. Something like that is on my mind... Any ideas?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2525
Location: Richmond, BC, Canada

PostPosted: Sat Oct 06, 2012 1:22 am    Post subject: Reply with quote

You have a few options.

Eix has a report about obsolete use flags,... maybe it even will update it, I don't know.

I also created enalyze in gentoolkit for general installed pkg db reports. It has a rebuild module that will create a new package.use file in your home directory. No need to run it as root. From there you can tweak it if you like and replace your existing one(s).
Code:
enalyze rebuild -p use
for a screen report. Run without the -p switch to generate the file. There are some other options as well, so run the help or see the man page.
Code:
enalyze rebuild -h
# or
man enalyze


There is also an analyze submodule that has several reports which can report how and what packages use what flags, how, etc.. It can be useful to decide which flags to make global by putting them in make.conf. Then run the rebuild submodule to create your new package.use.

It's useful for changing profiles too, and creating a new package.use to maintain your currently installed pkgs without change..
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1735
Location: Mannheim, Germany

PostPosted: Sat Oct 06, 2012 2:41 am    Post subject: Reply with quote

Very helpful, I can go on from there. Thank you :)
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4048

PostPosted: Sat Oct 06, 2012 2:35 pm    Post subject: Reply with quote

dol-sen wrote:
Eix has a report about obsolete use flags,... maybe it even will update it, I don't know.

Eix does never modify any config files (it even does not have permissions to do so since it drops its permissions). Moreover, eix does not support useflags seriously: It just tests whether the packages occuring in package.use do exist/are installed/are listed twice. The latter two tests are not done by default (since often not desired); to activate it you must set
/etc/eixrc wrote:
REDUNDANT_IF_IN_USE="-some"
REDUNDANT_IF_DOUBLE_USE="some"

(see eix-test-obsolete -h).
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