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

Re: dh_config_model_upgrade: package upgrade with Config::Model



]] Neil Williams 

| > * 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.
| 
| That's a user change, I thought the point of this was that changes *not
| done by users* are causing problems. Different problem.

You can change a configuration file without using a text editor.  Like,
enabling or disabling the «look for other printers on the network»
checkbox in CUPS' config actually changes the setting on disk and when
then the package is upgraded, the user might get a confusing question
from ucf about merging a configuration file instead of the postinst just
being bright enough to see that the user changed the browse setting and
automatically merging in any new settings.

[...]

| As is adding a perl dependency to packages that have no previous need
| for perl.

*shrug*, unless you're talking about embedded systems, which are of
course free to patch their way out of this some other way, most systems
will have perl anyway.  You well know that perl-base is Essential: yes
and not taking advantage of the tools we have is silly.

| The postinst doesn't have to parse the conffile, it just has to not
| generate the dpkg result (by generating the conffile instead of
| packaging it) and allow the app to transition from one to the next. If
| the existing file is different to what the package thinks it can
| upgrade, the package should not require dpkg to generate the error and
| the consequent halt of the package installation.

You seem to be quite confused as to the difference between configuration
file and conffile.  In many cases, it's non-trivial to properly edit a
configuration file properly preserving all user changes.  I believe this
module helps with that.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


Reply to: