Gentoo Archives: gentoo-user

From: David W Noon <dwnoon@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Cleaning redundant configuration files
Date: Thu, 02 Jun 2011 16:28:32
Message-Id: 20110602172644.108239bc@karnak.local
1 On Thu, 02 Jun 2011 01:10:02 +0200, Alan McKinnon wrote about Re:
2 [gentoo-user] Cleaning redundant configuration files:
3
4 >Apparently, though unproven, at 17:52 on Wednesday 01 June 2011, David
5 >W Noon did opine thusly:
6 >> On Wed, 01 Jun 2011 17:20:03 +0200, Alan McKinnon wrote about Re:
7 [snip]
8 >> >Your suggestion runs counter to the general philosophy that runs
9 >> >through Gentoo.
10 >>
11 >> In what way? Since it would be an option, it would not diminish the
12 >> control the user has over the machine.
13 >
14 >If you can provide solid examples where standard Gentoo tools do this
15 >operation:
16 >
17 >"I don't know what this is, but I'm just going to delete/modify/change
18 >it anyway"
19
20 My issue is with your "I don't know what this is," application.
21
22 Portage knows exactly what a given configuration file is, as the
23 package still owns the file. The way it detects that the file has been
24 customized is that the MD5 checksum and/or file size differ from that
25 stored in the package manifest.
26
27 As an example, here is the manifest for sys-apps/mlocate:
28
29 ========================================================================
30 dir /var
31 dir /var/lib
32 dir /var/lib/mlocate
33 obj /var/lib/mlocate/.keep_sys-apps_mlocate-0
34 d41d8cd98f00b204e9800998ecf8427e 1299760691 dir /etc
35 obj /etc/mlocate-cron.conf 61bf658fd1bd59e3d76a0508ce6a2c18 1299760691
36 dir /etc/cron.daily
37 obj /etc/cron.daily/mlocate 8a823735ba1c795530153b697a6eb4a6 1299760691
38 obj /etc/updatedb.conf 3b5668efaeb3c8189f0a083c5c0b0446 1299760691
39 dir /usr
40 dir /usr/share
41 dir /usr/share/locale
42 dir /usr/share/locale/en_GB
43 dir /usr/share/locale/en_GB/LC_MESSAGES
44 obj /usr/share/locale/en_GB/LC_MESSAGES/mlocate.mo
45 ac21511ec0a7ee5132efdcec3bba6972 1299760690 dir /usr/share/doc
46 dir /usr/share/doc/mlocate-0.23.1-r1
47 obj /usr/share/doc/mlocate-0.23.1-r1/AUTHORS.bz2
48 5c58a4a7b231e958659b3484a7ffc396 1299760691
49 obj /usr/share/doc/mlocate-0.23.1-r1/NEWS.bz2
50 dc349b5ff8a89aea3240d72cd5b1f003 1299760691
51 obj /usr/share/doc/mlocate-0.23.1-r1/ChangeLog.bz2
52 79d003105968fc22b09dffbeaf9fcae1 1299760691
53 obj /usr/share/doc/mlocate-0.23.1-r1/README.bz2
54 5e6b8cb236de3297976d1a44d86a8b36 1299760691 dir /usr/share/man
55 dir /usr/share/man/man1 obj /usr/share/man/man1/locate.1.bz2
56 88c757c7fb1eb260dd60fe8499d1d645 1299760691 dir /usr/share/man/man8
57 obj /usr/share/man/man8/updatedb.8.bz2 6aa33ce09341bf9a8f10e3ec8fe0548b
58 1299760691 dir /usr/share/man/man5
59 obj /usr/share/man/man5/mlocate.db.5.bz2
60 b626526695f7b1116807c33f4a370a7e 1299760691
61 obj /usr/share/man/man5/updatedb.conf.5.bz2
62 e5c7b82b2eb7bbce7ce1ce0b49ca1afd 1299760691 dir /usr/bin
63 obj /usr/bin/locate c16d67deca5064ea2fec1e2bb670f75f 1299760692
64 obj /usr/bin/updatedb 15884d54ea11e1a00b5f640ae49e93d8 1299760692
65 ========================================================================
66
67 [For those who don't know, this file is
68 named /var/db/pkg/sys-apps/mlocate/CONTENTS. All packages have a
69 CONTENTS file, as that is how Portage keeps track of file ownership by
70 packages.]
71
72 Now, nearly everybody modifies /etc/updatedb.conf. This does not
73 remove that name from mlocate's manifest. So, Portage knows precisely
74 to which package the file belongs. Hence I think your assertion of "I
75 don't know what this is," is specious.
76
77 If I then do "emerge -C mlocate" and delete the package, my customized
78 version of /etc/updatedb.conf will remain on the root partition, in
79 spite of the fact that it is now useless. During that emerge
80 operation, Portage knows that the file belongs to the package being
81 removed, but because the MD5 differs from that in the manifest it does
82 not delete the file. I would prefer that it did delete the file, at
83 least in response to a run-time option.
84 --
85 Regards,
86
87 Dave [RLU #314465]
88 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
89 dwnoon@××××××××.com (David W Noon)
90 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Cleaning redundant configuration files Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Cleaning redundant configuration files Alan McKinnon <alan.mckinnon@×××××.com>