Sunday, June 26, 2011

Tour De Coups

Yesterday Gretchen and I went on the Tour De Coups! Some of the chicken coups were very impressive; even more impressive was some of the things people were growing in their back yards. One couple had a veritable forest of produce! It gave Gretchen some good ideas for the garden, and helped renew my chicken coup building inspiration.

Also a bit of old news; I got a RAID card a week or two ago:


My array is up and running, and I've already expanded it twice! I hope to migrate it to RAID 6 and add a hot-spare before July 8th; but we'll see how it goes.

Sunday, June 12, 2011

Gentoo maintiance

After running Gentoo for years, if not always on my primary computer, I'd like to think that I've learned a thing or two about how to keep my system up to date. So here is a list of the commands/utilities that I use to keep my system running smoothly

emerge-sync
emerge --update --deep --newuse world
dispatch-conf
revdep-rebuild

(Repeat the last two commands until they both finish with nothing to do.)
lafilefixer --justfixit
eix-update
eix-test-obsolete

(if obsolete packages are found remove or, more likely,
upgrade them and run revdep-rebuild and dispatch-conf again)
emerge -av --depclean (*** be careful with this one ***
It's suggestions on what to remove are sometimes dumb.)
eclean distfiles
emaint --check world
emaint --fix world



Many people have told me that doing an emerge --depclean can bork one's computer. But I've never had any trouble with it, until today. I wasn't paying enough attention, and it removed Python. A whole bunch of stuff is dependent on python, including emerge itself. So I had to unpack, configure and make python manually:

cd /tmp/
tar xjf /usr/portage/distfiles/Python-2.6.6.tar.bz2
cd Python-2.6.6/
./configure --with-fpectl --infodir=/usr/share/info --mandir=/usr/share/man
make
make install prefix=/usr

(You might have to fix the python symlinks in /usr/bin/; especially
if you are not installing the same version that was removed)
emerge python
cd
rm -rf /tmp/Python-2.6.6
eselect python list
eselect python set 2

(On my system Python2.6.6 was first, and python 2.7.1 was second.)
python-updater
rm /usr/bin/python2.6
rm /usr/bin/pydoc2.6
rm /usr/bin/2to3-2.6
rm -rf /usr/include/python2.6
rm /usr/lib/libpython2.6.a
rm -rf /usr/lib/python2.6
emerge --oneshot =dev-lang/python-2.6.6-r2

(Just to make sure I deleted all of the manually installed python.
If I missed anything it would result in a file collision)



Then I started my regular maintenance cycle above over again. The old Python 2.6.6 was removed, and everything continued to work because python-updater had switched all the python dependent programs over to Python 2.7.1

After going through all of this I realized that the problem was caused by upgrading from python version 2.6.6 to 2.7.1 - and not running python-updater afterward. All the programs that use python were still set to use version 2.6.6; while emerge --depclean saw that there was a new version and got rid of the old one. If I had realized, and run python-updater immediately after noticing the problem I might have been able to avoid all this. All though it was a fun adventure.

See how easy that was! Gentoo GNU/Linux is the best.