autodepclean script (was "how to remove HAL")
On Tue, Aug 17, 2010 at 09:49:22PM +0200, Enrico Weigelt wrote
> I've just experimented a bit with that and it turned out that > --depclean doesn't clean up the buildtime-only deps. But if I > remove one of them (eg. cabextract), they don't get pulled in again > (that's indicating the depending ebuilds are written properly). This reminds me of a script I've been working on to remove unnecessary cruft. Everything that follows is run as root, because it runs "emerge". The attached script "autodepclean" parses the output from "emerge --pretend --depclean" and generates a script "cleanscript" that you can run to clean up your system. This should handle your situation, but it's also a general solution to the entire class of problems of cleaning up when you remove all programs or USE flags that pull in a lib. It is not restricted to just HAL Warning, this script is beta. Use with care. It will remove gentoo-sources versions higher than your current kernel. This is technically correct for removing unused ebuilds. But it may not be what you want. -- Walter Dnes <waltdnes@waltdnes.org> #!/bin/bash # autodepclean script v 0.01 released under GPL v3 by Walter Dnes 2010/08/18 # Generates a file "cleanscript" to remove unused ebuilds, including # buildtime-only dependancies. # # Warning; this script is still beta. I recommend that you check the output # in cleanscript before running it. It is agressive about removing unused # gentoo-sources versions. This includes those that are higher than your # current kernel. This is technically correct for removing unused ebuilds, # but it may not be what you want. # echo "#!/bin/bash" > cleanscript echo "#" > cleanscript.000 emerge --pretend --depclean | grep -A1 "^ .*/" | grep -v "^ *" | grep -v "^--" | sed ":/: { N s: :: s/ selected: /-/ s/^ /emerge --depclean =/ }" >> cleanscript.000 while read do echo "${REPLY}" >> cleanscript if [ "${REPLY:0:6}" == "emerge" ]; then echo "revdep-rebuild" >> cleanscript fi done < cleanscript.000 chmod 744 cleanscript |
autodepclean script (was "how to remove HAL")
On Thursday 19 August 2010, Walter Dnes wrote:
> On Tue, Aug 17, 2010 at 09:49:22PM +0200, Enrico Weigelt wrote > > > I've just experimented a bit with that and it turned out that > > --depclean doesn't clean up the buildtime-only deps. But if I > > remove one of them (eg. cabextract), they don't get pulled in again > > (that's indicating the depending ebuilds are written properly). > > This reminds me of a script I've been working on to remove > unnecessary cruft. Everything that follows is run as root, because > it runs "emerge". The attached script "autodepclean" parses the > output from "emerge --pretend --depclean" and generates a script > "cleanscript" that you can run to clean up your system. This should > handle your situation, but it's also a general solution to the > entire class of problems of cleaning up when you remove all programs > or USE flags that pull in a lib. It is not restricted to just HAL > > Warning, this script is beta. Use with care. It will remove > gentoo-sources versions higher than your current kernel. This is > technically correct for removing unused ebuilds. But it may not be > what you want. I'm unclear about the aim of your script, what does different from "emerge -a --depclean" followed by "revdep-rebuild -- -a"? Ciao Francesco -- Linux Version 2.6.35-gentoo-r1, Compiled #1 SMP PREEMPT Wed Aug 11 07:11:30 CEST 2010 Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4021.84 Bogomips Total aemaeth |
autodepclean script (was "how to remove HAL")
On Sat, Aug 21, 2010 at 12:07:40PM +0200, Francesco Talamona wrote
> I'm unclear about the aim of your script, what does different from > "emerge -a --depclean" followed by "revdep-rebuild -- -a"? The autodepclean script automatically generates a list of of target ebuuilds to clean out (i.e. "cleanscript"). This gives you the opportunity to review it and delete items from the list before going ahead. Does "emerge -a --depclean" allow you to skip individual items? -- Walter Dnes <waltdnes@waltdnes.org> |
autodepclean script (was "how to remove HAL")
On Sunday 22 August 2010, Walter Dnes wrote:
> On Sat, Aug 21, 2010 at 12:07:40PM +0200, Francesco Talamona wrote > > > I'm unclear about the aim of your script, what does different from > > "emerge -a --depclean" followed by "revdep-rebuild -- -a"? > > The autodepclean script automatically generates a list of of target > ebuuilds to clean out (i.e. "cleanscript"). This gives you the > opportunity to review it and delete items from the list before going > ahead. Does "emerge -a --depclean" allow you to skip individual > items? Ah ok, now i see the point. Usually I prefer to stop depclean (answering no) and specify the exceptions with emerge --noreplace. This is because the exclusion of some packages from depclean can affect the following result of it. If you install a package having many dependencies, with emerge --oneshot and then run emerge --depclean you'll see that is easier to run two times depclean than edit the generated list :) Cheers Francesco -- Linux Version 2.6.35-gentoo-r1, Compiled #1 SMP PREEMPT Wed Aug 11 07:11:30 CEST 2010 Two 2.9GHz AMD Athlon 64 Processors, 4GB RAM, 11657 Bogomips Total aemaeth |
| All times are GMT. The time now is 10:42 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.