[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Moving a conffile between packages


(this pertains to RC bug #781050 [1])

Assume a package A with a conffile /etc/foo.conf. A while ago, package A
was split into package A and B, and B took over the conffile. B declares
the necessary Breaks/Replaces.

However, an upgrade to from a pre-split A to a post-split A did not
automatically pull in B, with the result that A's '/etc/foo.conf'
lingered around as an obsolete conffile unless the user elected to
install B as well, and this was reported as a bug.

So in the last revision, a debian/A.maintscript file was added to A that
rm_conffile'd /etc/foo.conf.

The result for A was as intended: with only A installed, an upgrade
removed the obsolete conffile.

However, with both A and B installed, it appears that the order in
upgrades happen is relevant. In all my local tests, I did not encounter
this problem [2], but as seen in [1], it can happen.

Does someone know of a clean way to resolve this issue? The simplest
solution I can think of is just to accept the obsolete conffile as a wart.

I believe this is very similar or identical to what was reported in
#595112 [3] as a dpkg-maintscript-helper feature request, but that's
still open. [4] is also very similar, but I'm wondering whether a
simpler solution has become available in the meantime.


[1] https://bugs.debian.org/781050

[2] https://bugs.debian.org/780411#44

[3] https://bugs.debian.org/595122

[4] https://lists.debian.org/debian-devel/2012/02/thrd2.html#00249

Reply to: