Re: Removing self-managed configuration files?
Marc Haber <firstname.lastname@example.org> wrote:
> The file is under ucf control (I omitted that to lessen complexity),
Hey! We are doctors. You have to tell us _everything_. :-)
> but ucf does not know about the file any more if it is not in the new
> package and will therefore not handle it.
Uh, if you don't 'ucf --purge' it, I fear it will remain in the ucf
cache. There is code doing what you want in tetex-bin (not written by
me). For instance, in debian/common.functions.in, you can find:
md5sum=$(grep "$file$" /var/lib/ucf/hashfile | cut -f 1 -d ' ')
if [ -z "$md5sum" ]; then
test -f "$file" || return 0
currmd5sum=$(md5sum $file | cut -d ' ' -f 1)
if [ "$oldmd5sum" != "$currmd5sum" ]; then
mv $file $oldstuff_dir/$(basename $file).$PREINST_MOVE_EXT
if [ -x /usr/bin/ucf ]; then ucf --purge $file; fi