When I first started using Gentoo, I didn't know what etc-update was for but each time I emerged a package it would complain about all the ._xxxxxx files. Upon further investigation I realized that I really wanted some of the updates and I didn't want others. I wrote a little shell script that finds the files, does a diff against the original and gives me a simple prompt: Update, Ignore, Remove new:
A simple enter key, or a U or u will just install the new file. I lets me ignore the file this time and R removes the new version. R removes the new config file. This is especially handy if it would wipe out my /etc/fstab. There are few config file changes that I need merge in by hand. I have seen other similar scripts, and I have tried etc-update, but I keep using mine. I have cleaned it up a bit and it is attached. Cheers, -- Steve Herber [EMAIL PROTECTED] work: 206-221-7262 Security Engineer, UW Medicine, IT Services home: 425-454-2399 On Fri, 25 Mar 2005, Nuitari wrote: > >> A discussion of the dangers of etc-update. Protect your hand-crafted > >> config files. Especially fstab and group. > > > > This is always a good one to emphasize. (Do note that the fstab issue is > > going away, however. I don't know about stable, but ~ baselayout doesn't > > contain that file any more, so it's not overwritten. Continuing to use it > > Now I know that this isn't the best content in messages, but I'm > definitely happy that it is going ot be taken out. > > What I would like to see is that the original (eg default) configuration > file is saved somewhere and that when a program is updated that changes > are checked against that file and not the currently installed one, that > way there is much less risk of overwritting a customized file when there > is no actual updates. > > -- > gentoo-amd64@gentoo.org mailing list >
#!/bin/sh # Copyright 2004 by Steve Herber # Distributed under the terms of the GNU General Public License v2 # set -x START=' /etc /usr/X11R6/lib/X11/xkb /usr/kde/3.3/share/config ' echo Searching in $START for cfg in `find $START -name '._*' -print` do real_cfg=`echo $cfg | sed s/._cfg...._//` echo echo Checking $real_cfg diff $cfg $real_cfg read -p "Update, Ignore, Remove new: ${real_cfg}?" answer case $answer in # blank as default gives us an update ""|U|u) mv $cfg $real_cfg ;; I|i) echo Not updating $real_cfg ;; R|r) rm $cfg ;; *) echo Not updating $real_cfg ;; esac done exit
-- gentoo-amd64@gentoo.org mailing list