Sonntag, 3. Juni 2007

Why many comments in config files are bad

Just yum-updated my local home-server from FC6 to F7 (my main machines at home and work used rawhide for weeks already). After such upgrades I always look over the .rpmnew files that got created and merge the changes back from them into the proper config files with meld and delete the rpmnewfiles.

That's no big deal; with a script of of mine I normally would be able to do it in one or two minutes for that machine. I would, if there wasn't dovecot.conf and squid.conf. They have lots of comments in them that explain nearly each of the settings. That just sucks because I now have to look over all of them :-((

Especially dovecot.conf is bad:

[thl@truhe etc]$ diff -u dovecot.conf dovecot.conf.rpmnew | grep '^+' | wc -l
[thl@truhe etc]$ diff -u dovecot.conf dovecot.conf.rpmnew | grep '^+' | grep '#' | wc -l
[thl@truhe etc]$

Most of those eight non-comment lines are probably settings I actually did.

1 Kommentar:

Aurelien hat gesagt…

Shameless plug : I wrote a yum plugin to merge configuration files on updates : just "yum install yum-merge-conf" and then update with "yum --merge-conf update" (I use an alias here, YMMV). If you find bugs, you know how to contact me... ;)