Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Cleaning redundant configuration files
Date: Thu, 02 Jun 2011 16:49:06
Message-Id: 20110602174735.1f786892@zaphod.digimed.co.uk
In Reply to: Re: [gentoo-user] Cleaning redundant configuration files by David W Noon
1 On Thu, 2 Jun 2011 17:26:44 +0100, David W Noon wrote:
2
3 > My issue is with your "I don't know what this is," application.
4 >
5 > Portage knows exactly what a given configuration file is, as the
6 > package still owns the file. The way it detects that the file has been
7 > customized is that the MD5 checksum and/or file size differ from that
8 > stored in the package manifest.
9 >
10 > As an example, here is the manifest for sys-apps/mlocate:
11
12 [snip]
13 > Now, nearly everybody modifies /etc/updatedb.conf. This does not
14 > remove that name from mlocate's manifest. So, Portage knows precisely
15 > to which package the file belongs. Hence I think your assertion of "I
16 > don't know what this is," is specious.
17
18 You have picked an excellent example, because mlocate is not the package
19 that owns or has owned /etc/updatedb.conf, slocate does too. If the
20 checksum does not match, portage does not know with certainty that the
21 file belongs to that package, all it knows is that the file has a name in
22 common with a file installed by that package.
23
24 In fact, it is most likely that that file was never owned by mlocate, on
25 most systems it would have been installed by slocate, modified by the
26 user, left in place when slocate was unmerged and not overwritten when
27 mlocate was installed. So you have a file that was installed by one
28 package that you want another package to uninstall.
29
30 There are other examples of different packages, usually doing the same
31 job and mutually blocking, that share config file names. That is why
32 portage cannot sanely remove a file that just happens to have the same
33 name as a file that may have been installed by the package in question,
34 even though it does not have the same contents as that package's version
35 of the file.
36
37
38 --
39 Neil Bothwick
40
41 Top Oxymorons Number 45: Resident alien

Attachments

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