On Tue, May 15, 2012 at 12:12:51AM +0200, Marco d'Itri wrote: > reassign 672945 dpkg > severity 672945 wishlist > retitle 672945 dpkg should support moving a conffile between packages > thanks > > On May 14, Josh Triplett <j...@joshtriplett.org> wrote: > > > netbase 5.0 drops /etc/init.d/networking; thank you for that. However, > > dpkg does not automatically remove conffiles (even unmodified conffiles) > > when upgrading to a version of the package that does not include the > > conffile. Thus, upgrading from previous versions of netbase to netbase > > 5.0 leaves /etc/init.d/networking around. > This is true, as long as you do not have ifupdown installed (which is > very unusual).
Granted. > The consensus on #debian-devel is that nobody should waste their time > to fix this, but I will be happy to accept a patch. > > This post documents a possible solution: > https://lists.debian.org/debian-devel/2012/02/msg00254.html . Going by that post, would something like the following in the configure section of the postinst work? if dpkg --compare-versions "$2" lt 5.1 ; then if [ "$(dpkg-query --showformat='${Status}' -W ifupdown)" = "unknown ok not-installed" ] && [ -e /etc/init.d/networking ] && [ "$(md5sum < /etc/init.d/networking)" = "3bb6d34b6a295bb01142d9a667de4b0d -" ] ; then rm -f /etc/init.d/networking fi fi The version comparison assumes the change goes into version 5.1 of netbase. > As suggested by #debian-devel, I am reassigning this bug to dpkg. Personally, I'd love to see this bug fixed in dpkg by just removing unmodified conffiles that disappear from a package, but nonetheless having a well-supported mechanism to move conffiles between packages would help. - Josh Triplett -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org