On Mon, Sep 11, 2006 at 04:02:53PM -0700, Chris White wrote:
> On Monday 11 September 2006 15:22, Ciaran McCreesh wrote:
> > * Otherwise, try again with ``._cfg0001_name``, then ``._cfg0002_name`` and 
> > so on (base ten is used for the number part) until a usable filename is
> > found. 
> For what purpose are the older cfg[number]_name files kept around?  I ask 
> because I would anticipate the default behavior for replacing configuration 
> files with their pending updates to be picking the newest update.  That said, 
> the previous versions would not serve a purpose, or is there something I 
> don't see?
Consider a case as follows:
1. package foo provides /etc/bar - the contents of the file differ depending on 
the USE flags.
2. an old version of foo is already installed, with USE='a'
3. user does "USE='a b' emerge foo" - /etc/._cfg0000_bar is created.
4. user then realizes he actually wanted USE=c as well, so does "USE='a b c' 
emerge foo" - this provides /etc/._cfg0001_bar.

You now have 3 files, non-identical:
/etc/bar
/etc/._cfg0000_bar
/etc/._cfg0001_bar

The user now runs etc-update or dispatch-conf or whatever tool they use
to manage their configurations.

The 'try again rule to find a usable filename' is specifically intended
for these cases where the configuration management is NOT used between
more than two changes of a configuration file (Ideally it should be, but
that's a different discussion).

-- 
Robin Hugh Johnson
E-Mail     : [EMAIL PROTECTED]
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpJDzBNDGPzq.pgp
Description: PGP signature

Reply via email to