Didier Raboud wrote: > while updating one of my packages (which again dropped a conffile), I had to > modify its preinst, according to http://wiki.debian.org/DpkgConffileHandling . > > This works but is IMHO suboptimal: the code referenced on the wiki has to be > hand copied in each and every package that has to move or delete conffiles. > > This could maybe be done through a dh_oldconffiles (for removing) and a > dh_moveconffiles (for moving). Those helpers would read > ${package}.oldconffiles > in debian/ containing e.g.:
I prefer to keep large blocks of code out of maintainer scripts entirely, by putting them in utilities that debhelper can then arrange maintainer scripts to call. Or that maintainers can call directly. So, I wrote a patch to dpkg in 2008 to add a dpkg-conffile command, that handles renaming and removal of conffiles. http://lists.debian.org/debian-dpkg/2008/01/msg00143.html There was a little bit of followup, but dpkg's maintainers never integrated it, nor do they seem to have given a reason not to integrate it. The patch still seems good. From the history of http://wiki.debian.org/DpkgConffileHandling , I see only one bugfix has been made to that page since, that should be folded into the patch. It is described here: http://lists.debian.org/debian-devel/2008/03/msg00795.html So, I encourage dpkg's maintainers to review and accept that patch. (Then debhelper can remove the conffile moving code that it already uses in dh_installmodules and dh_installudev, and I can think about perhaps providing a dh_oldconffiles command.) -- see shy jo
signature.asc
Description: Digital signature