Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
portage-decruft - cleanup /etc/portage
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
appro
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2003
Posts: 144
Location: Germany/Rosenheim

PostPosted: Fri Apr 18, 2008 3:08 pm    Post subject: portage-decruft - cleanup /etc/portage Reply with quote

Hi everyone,

I've written a little script called portage-decruft that checks the configuration in /etc/portage and reports on redundant, obsolete or irrelevant entries. Yep, it's yet another cleanup helper :) The difference is, that this one is done in python and uses the portage-modules to handle the atoms, useflags and so one - so it should be rather accurate.

Some of the current features (portage-decruft-0.1):

I'm now looking for feedback and ideas how to improve the script - any thoughts?

Cheers, Emil
_________________
If a packet hits a pocket on a socket on a port, and the bus is interrupted and the interrupt's not caught, then the socket packet pocket has an error to report.
Back to top
View user's profile Send private message
yoyo
Bodhisattva
Bodhisattva


Joined: 04 Mar 2003
Posts: 4273
Location: Lyon - France

PostPosted: Fri Apr 18, 2008 3:35 pm    Post subject: Reply with quote

Hi appro,

Seems very interesting, as I have lot of old entries in my "portage.*" files and wanna make some cleanup for a long time (in make.conf too :wink: ) ...

Will try to check it this week-end and report here !

Enjoy !
_________________
La connaissance s'accroît quand on la partage.
JCB
Back to top
View user's profile Send private message
yoyo
Bodhisattva
Bodhisattva


Joined: 04 Mar 2003
Posts: 4273
Location: Lyon - France

PostPosted: Mon Apr 21, 2008 9:07 am    Post subject: Reply with quote

This script seems to work great !! Have to make others tests but for now it's good.

A way to improve the script was an option to update the configfiles automagically (with a backup first of course) cause I have hundreds (:mrgreen:) of errors on my portage.* files (old useflags, ~arch packets testing (like e17, kxdockers etc.)).

Enjoy !
_________________
La connaissance s'accroît quand on la partage.
JCB
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


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

PostPosted: Thu Apr 24, 2008 1:25 am    Post subject: Reply with quote

This sounds perfect for gpytage. It is a pygtk /etc/portage/package.* file editor that I've been encouraging and helped with a few patches. It is now quite usable and this functionality would add to it greatly. Then I can make a plug-in for it all to run from porthole :mrgreen: Even if ken doesn't want to add/import your code to gpytage, I may very well add a plug-in to porthole. I'll have to look at your code to see how and what modules I can import into a plug-in. I know that my /etc/portage directory needs a lot of cleanup.
_________________
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
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Thu Apr 24, 2008 8:44 am    Post subject: Reply with quote

Nice script! Works fine for me and cleaned up 10 entries :)
Back to top
View user's profile Send private message
appro
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2003
Posts: 144
Location: Germany/Rosenheim

PostPosted: Wed Jun 18, 2008 12:40 pm    Post subject: Reply with quote

First of all let me say thanks for all the feedback, I'm currently working towards adding a autofix option :)

I'm happy to announce portage-decruft-0.1.3, which contains some small fixes:
  • Stop stripping '-' and '+' on both ends of use-flags, since this breaks "c++" and others. All hail bekks!
  • dol-sen provided a patch to make portage-decruft work with the new portage-2.2 module structure. Thanks!
  • '-*' is now supported for package.use (for example "app-portage/eix -* sqlite")

Cheers, Emil
_________________
If a packet hits a pocket on a socket on a port, and the bus is interrupted and the interrupt's not caught, then the socket packet pocket has an error to report.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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