Gentoo Archives: gentoo-dev

From: Joerg Hoh <joerg@××××××.org>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: extension of etc-update
Date: Tue, 10 Aug 2004 10:43:28
Message-Id: 20040810104326.GB22751@hydra.joerghoh.de
1 Hi
2
3 I'm unhappy with the etc-update script. In my eyes it lacks at least one
4 necessary feature:
5
6 Detection of unmodified config-files
7
8 When I recently updated my sytem, it gave me more than 200 files to look
9 at. That is impossible, since in most cases I never heard of such a file
10 (and therefor I don't undestand what that file means). So I did a quick
11 look over the list, found nothing relevant to me and and did "-5". Well,
12 after that I wonderd why my mails were rejected. Oh, I've overseen
13 /etc/ssmtp.conf! Bad thing, with the default config it doesn't work.
14
15 My proposal is that we keep a list of configfiles and their md5 hashes.
16 etc-update maintains this list. We now have several cases:
17
18 * etc-update detects that we emerged a package which wasn't present and we
19 have new config files. So etc-update does the md5-hashing and puts the
20 hash into the hash-file.
21 * etc-update want's to install a new config-file and an
22 config-file is already present. Then it hashes the present config-file
23 and compares the hash to the hash already present in the hash-file.
24 - If the hashes differs, it asks the user what to do (as it now happens
25 with every config-file). If the user wants to replace the old,
26 user-modified config-file with the new one, the hash for the new
27 config-file is written to the hash-file.
28 - If the hashes are identical, it replaces the old config-file with the
29 new one and updates the hash-file.
30
31 I've looked at the etc-update script, but since I'm not good at
32 shell-scripting, I decided to rewrite it in python. Not all is done yet,
33 and I don't wanto to do unneeded work if someone wants to enhance the
34 shell-script.
35
36 You find my python version at http://www.devone.org/linux/gentoo.html
37
38 Another extension would be versioning of configuration files via cvs/rcs,
39 subversion or arch. But I had to do some more work on that ...
40
41 Joerg, mostly happy gentoo user
42
43
44 --
45 Fachbegriffe der Informatik (Nr 152): PORN
46 - Poster Ohne Richtigen Namen

Replies

Subject Author
Re: [gentoo-dev] RFC: extension of etc-update Guy Martin <gmsoft@g.o>
Re: [gentoo-dev] RFC: extension of etc-update Mike Williams <mike@××××××××.uk>