On Thu, Feb 05, 2004 at 10:48:35AM +0100, in <[EMAIL PROTECTED]>, Paul de Vrieze 
<[EMAIL PROTECTED]> wrote:
> On Thursday 05 February 2004 09:13, Drake Wyrm wrote:
> > I have to disagree completely. This is exactly why we use
> > CONFIG_PROTECT and etc-update. Packages *should* install a default,
> > but it shouldn't be called <config-file>.example. Documentation, such
> > as a config file example, belongs in /usr/share/doc/<package>. When
> > you re-emerge something, it should try to install everything it needs.
> > If the destination file is in a CONFIG_PROTECT directory, Portage does
> > exactly what you described (with a .cfg-XXXXX- prefix rather than an
> > .example suffix).
> >
> > With regard to default config files: look at </etc/mutt/Muttrc>.
> > Emerge net-mail/mutt, if you must. Beautiful example of the Right
> > Way(tm) to write a default.
> 
> Basically muttrc is not of the same class as passwd, fstab and group. If 
> you're up to it, just move the three to somewhere else and reboot. After 
> that I think you can appreciate that one must not be enabled to 
> overwrite them.

Ummm... Pass. Might be something I try right before the next time I get
the urge to wipe everything and reinstall from scratch. Falls in the
same category as trying `rm -rf /`. Only need to do it once, but you
gotta do it.

> First the defaults for those files can not and will not give you a 
> working setup. Basically when these files exist, the only way to create 
> usable new ones is to base them of the existing ones. These files are 
> system specific and cannot have reasonable defaults.

I give you half credit. `proc /proc proc defaults 0 0` and `tmpfs /dev/shm
tmpfs defaults 0 0` are examples of reasonable defaults. Furthermore,
where reasonable defaults cannot be assumed, reasonable comments can be
used. *That* is what I specifically like about the default Muttrc.

> It is never ever a 
> good idea to overwrite the current version with the config-protected 
> one. The only alternative solution I see would be to patch etc-update to 
> automatically ignore/remove these updates.

I have another alternative for you: don't overwrite your configs.

Seriously, though, the real blocker here is that *sometimes* we
*need* to make a distro-wide change to something like fstab. The
config-protect/etc-update mechanism is currently the only method we have
of distributing these changes without breaking users systems.

If you really want to do something like what you're describing, I imagine
it wouldn't be too hard to write a script to do that for you. Something
involving `find ${CONFIG_PROTECT} -path /etc/.cfg-????-fstab -o -path
${another-uberprotected-file} -exec rm '{}' ';'` Post it when you
finish. There are probably others who will get some use from it. As for
myself, I will make those decisions personally.

-- 
Batou: Hey, Major... You ever hear of "human rights"?
Kusanagi: I understand the concept, but I've never seen it in action.
  --Ghost in the Shell

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to