On 2018-08-01 18:05, Bernhard Schmidt wrote:
> So the file is there and not marked as conffile, because it has been
> created in postinst. Now in Buster the file is properly shipped as
> conffile (since commit 9ddbb41a71236815d246180b454850ec4ef7862d,
> included in 9.11.2+dfsg-6.
> 
> It is only appearing now because the named.conf.options has now been
> changed from the version contained in Stretch in 9.11.4+dfsg-2.

> But the
> underlying bug is in Stretch.

Not really. There is nothing wrong with the handling in stretch.
Using conffiles is just superior :-)
You just need to migrate properly ...

> I have no idea how to properly deal with this.

Suggestion: In the preinst check whether you are upgrading from <<
9.11.2+dfsg-6 and whether the file matches the version installed in
stretch (md5sum/...) and move it aside (maybe there were more possible
files installed by older versions, check for all of them). In the
postinst delete the backup. Restore it on failed-upgrade.

If the file was manually modified (i.e. does not match any known hash),
do nothing and let dpkg prompt the user.

I don't mind reviewing some patches.


Andreas

Reply via email to