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

Bug#771496: overwrites user changes to configuration file /etc/dpkg-cross/cross-compile on upgrade (violates 10.7.3)



Note however that said file "/etc/dpkg-cross/cross-compile" is not
declared as a conffile.
(See $ cat /var/lib/dpkg/info/dpkg-cross.conffiles )
The comments inside it clearly state that it is managed / updated
through debconf.

Reading the policy documentation most things are satisfied

"""
The other way to do it is via the maintainer scripts. In this case,
the configuration file must not be listed as a conffile and must not
be part of the package distribution. If the existence of a file is
required for the package to be sensibly configured it is the
responsibility of the package maintainer to provide maintainer scripts
which correctly create, update and maintain the file and remove it on
purge. (See Package maintainer scripts and installation procedure,
Chapter 6 for more information.) These scripts must be idempotent
(i.e., must work correctly if dpkg needs to re-run them due to errors
during installation or removal), must cope with all the variety of
ways dpkg can call maintainer scripts, must not overwrite or otherwise
mangle the user's configuration without asking, must not ask
unnecessary questions (particularly during upgrades), and must
otherwise be good citizens.
"""

The user's configuration in this case comes from debconf prompt and
that choice is preserved upon upgrades, without additional prompts and
is safe w.r.t. to dpkg prompts.

Why do you expect for direct edits to a  non-conffile to be preserved,
which is otherwise managed with debconf? Isn't this the same as
dbconfig.

/etc/dpkg-cross/cross-compile.sample on the other-hand is a conffile
and direct modifications to that file will be preserved and used to
generate /etc/dpkg-cross/cross-compile file.
Thus you can edit the .sample file to add other things in that file
and they will be preserved across upgrades.

-- 
Regards,

Dimitri.


Reply to: