[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_config_model_upgrade: package upgrade with Config::Model



On Fri, 04 Dec 2009 17:32:13 +0000, Neil Williams wrote:

> > Configuration file `/etc/sensors3.conf'
> >  ==> File on system created by you or by a script.
> >  ==> File also in package provided by package maintainer.
> >    What would you like to do about it ?  Your options are:
> >     Y or I  : install the package maintainer's version
> >     N or O  : keep your currently-installed version
> >       D     : show the differences between the versions
> >       Z     : background this process to examine the situation
> >  The default action is to keep your current version.
> > *** sensors3.conf (Y/I/N/O/D/Z) [default=N] ?
> That is a bug in the package, as described in my other reply. If the
> user hasn't changed that file, the package should be able to cope with
> the changes without prompting. Whichever package caused the file to be
> modified in such a way that it cannot be upgraded cleanly is BUGGY.

If the file is unmodified, then there's indeed something wrong. But
the interesting case is when the admin has changed something. The
common case that is getting on my nerves currently is:

* foo 1.0 ships /etc/foo.conf with
  featureA=yes
  featureB=no
* I change featureB to yes
* foo 2.0 ships /etc/foo.conf with
  featureA=yes
  featureB=no
  featureC=7
* Now dpkg ask if I want the new version or my modified one. But what
  I actually want is 
  - keep my change of the featureB variable and
  - add the new featureC variable
* Or more generally: I want to preserve my locally modified values
  and at the same time update the rest which I haven't touched.

And that's what Config::Model allows, as far as I understood it.
 
> > Avoid asking users configuration questions during packages upgrades.
> > This could make dist-upgrades between Debian releases easier.
> No, it hides the problem inside another dependency. The package should
> handle it's own config files *and* the bugs that result.

I don't consider writing parsers in each and every .postinst very
efficient.
 
Cheers,
gregor 
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
   `-    NP: Bob Dylan: Like A Rolling Stone

Attachment: signature.asc
Description: Digital signature


Reply to: