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

gregor herrmann <[email protected]> Sun, 7 Dec 2014 15:22:08 +0100
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <20141207142208.GA10024__7018.20478211648$1417962276$gmane$org@jadzia.comodo.priv.at>
Control: tag -1 + confirmed

On Sat, 06 Dec 2014 15:28:39 +0000, Dimitri John Ledkov wrote:

> 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.

Yes but it does it wrong.
The .config should read existing values from the file and feed them
into debconf.

C.f. man 7 debconf-devel, section "Config file handling".
 
> /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.

This is non-intuitive (why would I edit .sample to change the other
one?) and more importantly it doesn't work because the postinst just
replaces "#*default_arch".

Again, debconf-devel(7) has a nice template for the postinst action.


Cheers,
gregor
 

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Joel Harrison: Lonesome road blues
signature.asc (application/pgp-signature, 949 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQJ8BAEBCgBmBQJUhGKYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC
QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoGY0EQAMIIcIZ1gBv/Gzw6umtAshSe
4vBLDzYm0/G+BD0PM0o5dOUVgzbJJ28LpOeJrfOYApYaGw89WWl5Xo5Y3teqjnHv
g0qSpfrlSkpwtVIZH5sO5u4jFBRkyH0SfQy4MACx4b16T1fKQC4bRJeAQBNm63tL
YITuvoy6bZV/uZLRuW80Jjp8Njmrdygzfvz8EHxPzHwhQ2ReI122fwnBDGx4NxLK
X7oV12a1DDKdrVbwieeUkmSvnOPBlAtxJxnoFQP38e62E4ilbbZW5QoqwDVSHkmR
xs4FkTYIfOITzAmGWNNKQkgIfY9dGJOmk8t9DpGNFAbAFS+x/XB+AhfUUNQ4L6Bw
3/QAy8JP0ic6bx7EPrOi1FwZU51BFV+yYbTf1HNhtNWT+5Hj2m2HJYh6VX63sCcm
UPmDZVMAAx5gGoaV8SkHjwnVMbwZqUPSz5sUgJD5FKevHXkqL9r+g2UL+/3vcLa+
cip3knvqEBMNGqIS74n5SUhiJ3cJHMZ7x/VIUsv1wMaEcOIsvY9AQwcmpDb3Ur1n
W2/OdkkobkvsOwiMFILO4QMBFsLh4+MtxlUXoWyiILDIJrnvu9wTrpAsxaKS96tE
w4Jfp3YQI8Y6EkdG5kdvko17e5+nb4JHCcsYjQIDwfcsW31yZFsGqv/qo9pF0P6m
MsmgsmByNQ29FR9p1N0V
=ueS/
-----END PGP SIGNATURE-----