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

Bug#703022: debian-policy: Appendix G: Diversion example faulty (doesn't work for conffiles)



On Thu, 2013-03-14 at 10:34:58 -0700, Russ Allbery wrote:
> Torsten Jerzembeck <toje@nightingale.ms.sub.org> writes:
> > The example provided in Appendix G of the DPM regarding the removal of
> > diversions doesn't work if the file diverted is a conffile. This is
> > due to the fact that conffiles are not removed during a "remove", but
> > but only during a "purge". As a "purge" implies a "remove" beforehand
> > (the postrm script is called twice), the example will fail even on a
> > "purge" with dpkg-divert refusing to clobber the existing conffile.
> 
> > IMO a footnote should be added alerting the user to this fact and
> > providing a solution for this special case (use "purge" instead of
> > "remove" as the first test).
> 
> The last time I looked at this (which was several years ago), diverting
> conffiles had enough problems that it was tempting to just say that it
> didn't work reliably.  I wonder if we should explicitly recommend against
> diverting conffiles, or if some of those problems have been cleaned up.
> Some Debian sites, such as (IIRC) MIT, have extensive local infrastructure
> based on diverted conffiles and have run into all sorts of weird edge
> cases with them.

It should work way better than before, in part thanks the to the usage
and bug reporting from MIT, but as you say there's still some wrinkles,
which I plan on fixing for 1.17.x; in any case I'm always interested in
any bug reports affecting these.

There's for example still an unneeded prompt in one test case on the dpkg
functional test suite (t-conffile-divert-conffile):

  <http://anonscm.debian.org/gitweb/?p=dpkg/pkg-tests.git;a=blob;f=Makefile;hb=HEAD>

Regarding this bug report, if there's anything to be updated that
should be either in the main policy or the dpkg documentation.

Thanks,
Guillem


Reply to: