FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-12-2010, 06:36 AM
"Walter Dnes"
 
Default Beta autodepclean script (not yet ready for primetime)

The attached script takes the output of "emerge --pretend --depclean"
and formats it into a script "cleanscript" which contains a set of
"emerge --depclean" commands to remove individual items. Do *NOT*
remove the "exit" and source "cleanscript". It's there to protect you.

The script is very simple-minded about kernel-sources. I.e. it
removes all but the latest version. E.g. I have 3 kernels in /usr/src,
namely 2.6.31-r10, 2.6.32-r7, and 2.6.34-r1. I'm currently on
2.3.32-r7. The script will want to remove 2.6.31-r10 and 2.6.32-r7 and
keep 2.6.34-r1. I suspect that something similar may be true if you
have multiple versions of gcc. Sources and gcc are a bit weird in that
they're not "dependancies" of any packages, and they aren't listed in
"world".

One other thing I have noticed is that the format...
"emerge --depclean =sys-boom/bah-1.2.3.4"
...will not work if it's masked. autodepclean will find it, but you
need to use "emerge --unmerge" to remove it.

Other than that, the output from autodepclean seems to be OK. I've
manually removed a bunch of stuff (cutting-&-pasting lines from
cleanscript), and revdep-rebuild hasn't found any breakages. If you are
unsure about any of its suggestions, please ask on this list.

--
Walter Dnes <waltdnes@waltdnes.org>
#!/bin/bash
echo exit > cleanscript
emerge --pretend --depclean |
grep -A1 "^ .*/" |
grep -v "^ *" |
grep -v "^--" |
sed ":/: {
N
s:
::
s/ selected: /-/
s/^ /emerge --depclean =/
}" >> cleanscript
 

Thread Tools




All times are GMT. The time now is 06:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org