Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Package Manager Specification: configuration protection
Date: Tue, 12 Sep 2006 00:19:40
Message-Id: 20060912011312.GF6819@curie-int.orbis-terrarum.net
In Reply to: Re: [gentoo-dev] RFC: Package Manager Specification: configuration protection by Chris White
1 On Mon, Sep 11, 2006 at 04:02:53PM -0700, Chris White wrote:
2 > On Monday 11 September 2006 15:22, Ciaran McCreesh wrote:
3 > > * Otherwise, try again with ``._cfg0001_name``, then ``._cfg0002_name`` and
4 > > so on (base ten is used for the number part) until a usable filename is
5 > > found.
6 > For what purpose are the older cfg[number]_name files kept around? I ask
7 > because I would anticipate the default behavior for replacing configuration
8 > files with their pending updates to be picking the newest update. That said,
9 > the previous versions would not serve a purpose, or is there something I
10 > don't see?
11 Consider a case as follows:
12 1. package foo provides /etc/bar - the contents of the file differ depending on the USE flags.
13 2. an old version of foo is already installed, with USE='a'
14 3. user does "USE='a b' emerge foo" - /etc/._cfg0000_bar is created.
15 4. user then realizes he actually wanted USE=c as well, so does "USE='a b c' emerge foo" - this provides /etc/._cfg0001_bar.
16
17 You now have 3 files, non-identical:
18 /etc/bar
19 /etc/._cfg0000_bar
20 /etc/._cfg0001_bar
21
22 The user now runs etc-update or dispatch-conf or whatever tool they use
23 to manage their configurations.
24
25 The 'try again rule to find a usable filename' is specifically intended
26 for these cases where the configuration management is NOT used between
27 more than two changes of a configuration file (Ideally it should be, but
28 that's a different discussion).
29
30 --
31 Robin Hugh Johnson
32 E-Mail : robbat2@g.o
33 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85