I like keeping my Gentoo system up-to-date (including new use flags, deep depedency checking and build dependencies) and clean from packages that are no longer required, but also make sure that updates don't break things like linked libraries. To achive this quite a few things have to be done seperately; sync, update, etc-update (if applicable), depclean and revdep-rebuild. That can be an arduous task so I made a script which does it all for me, which I'd like to share. Maybe others think this is useful to them too, and any input if things could be done better would be welcome too
It's not an advanced script, but it handles the following things:
1. Check for last sync time and only sync if the portage tree when it has not been synched in the past 24 hours (can be overridden with --sync or --no-sync).
2. Run "emerge -uvDNa --with-bdeps=y @world" to update the system, including new USE flags, checking the whole dependency tree and including build time dependencies for the entire @world tree.
3. Run "etc-update" to update any configuration files (if applicable).
4. Run "emerge -ca" to clean obsolete packages.
5. Check for preserved/old libraries (this script checks for preserved libraries and if present runs emerge @preserved-rebuild, after that it does an extra check for remaining old libraries which is a leftover from before the preserve-libs feature was added to portage).
6. Run "revdep-rebuild" to make sure everything is still linked properly.
7. Run "eclean-dist --destructive" to free up space and keep /usr/portage/distfiles/ in check.
I use eix to sync the portage tree (provided by app-portage/eix) and eclean-dist to clean emerge downloads (provided by app-portage/gentoolkit), but that can of course be changed in the script. The script aborts if any of the steps results in an error. Note that you should always carefully examine anything done by emerge, all emerge commands include --ask, but I'm not responsible if you break your system
gentoo-update
oldlib-check
Hopefully it's useful to others and/or people have tips/suggestions to improve the script(s)
Sincerely,
SunMar.



