Package: dpkg Version: 1.18.24 Severity: wishlist Dear Maintainer,
The conffile conflict handling ("conffile-prompt") done by dpkg (and
ucf as well) was always quite painful. This is not dpkg's fault, it's
just bringer of the bad news that is: Two sides fiddled with the same
file, it's not possible to resolve that in a robust way. So bug the
user about it.
Frankly, I have no idea how other people deal with this - perhaps
always doing by hand, optionally swearing, perhaps using a
configuration managment that knows about the right thing to do.
For me, I wrote a tool "confmergs" years ago that implements a
solution for #32877 using an external programm. Called manually, it
guides you through the merge process by presenting the both sides of
each chunk in the diff, allowing you to choose between either version,
or spawn an editor with both in the "diff --merge"-like view to resolve
this by hand. Plus some magic to silently pick the new version if the
hunk affects commented line only.
Now I'd like to ease handling since until now I have to copypaste both
filenames to start the tool. I am lazy, so I'm asking you to consider
adding (in ascending order of complexity):
* Environment variables
When using the "z" (shell) option in the conffile conflict dialog,
load the names of the two files into environment variables so an
external program can just pick the names from there.
* Launch configurable helper from dialog
Create a configuration option to define a "conffile conflict helper
program", that will show up in the dialog as well, perhaps as
"(X) Run configured helper program $helper on these files"
* Full integration
If there's a program that seems suitable for universal use, embed this
into dpkg. This has already been suggested in #601063
Aside: Several packages use ucf to handle conffile conflicts, and all
the solutions should be implemented there as well. I might take care of
this, for the moment just one thing: For reasons of courtesy, the
environment variables should not contain the "dpkg" string. Perhaps
"CONFFILE_{LEFT,RIGHT}"?
In IRC, You'd asked for patches. Can do, after you've answered my "Is
this crazy or what?". First thing should be a no-brainer, second not
too difficult. Third one ... we'll see.
Christoph
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.34 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
Versions of packages dpkg depends on:
ii libbz2-1.0 1.0.6-8.1
ii libc6 2.24-12
ii liblzma5 5.2.2-1.2+b1
ii libselinux1 2.6-3+b2
ii tar 1.29b-1.1
ii zlib1g 1:1.2.8.dfsg-5
dpkg recommends no packages.
Versions of packages dpkg suggests:
ii apt 1.5~beta1
pn debsig-verify <none>
-- Configuration Files:
/etc/logrotate.d/dpkg changed [not included]
-- no debconf information
signature.asc
Description: Digital signature

