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

Incorrect use of dpkg conffile suffixes and lintian checks



Hi folks,

I noticed earlier today that many packages are creating copies of
conffiles in their maintainer scripts with the extension ".dpkg-bak",
which is not an extension used or removed by dpkg:

% grep EXT lib/dpkg.h
#define DEBEXT             ".deb"
#define OLDDBEXT           "-old"
#define NEWDBEXT           "-new"
#define REMOVECONFFEXTS    "~", ".bak", "%", \
#define DPKGTEMPEXT        ".dpkg-tmp"
#define DPKGNEWEXT         ".dpkg-new"
#define DPKGOLDEXT         ".dpkg-old"
#define DPKGDISTEXT        ".dpkg-dist"
#define REASSEMBLETMP      "reassemble" DEBEXT

A lot of scripts are copying the rm_conffile script from
http://wiki.debian.org/DpkgConffileHandling which adds a .dpkg-bak
suffix to old conffiles.

Are such names allowed?  Why can't .dpkg-old be used instead?

If so, this is going to cause problems with programs like run-parts(1)
which do not take this case into account when excluding dpkg conffile
cruft, and so will run or read files which they should not use.

If this is not permitted behaviour, could we add a lintian check?

If it is permitted behavour, can run-parts and the dpkg documentation be
updated to match this and document its use, respectively?

A check on the packages in the lintian lab on gluck shows quite a lot of
matches.  If this is truly buggy, I'd like to mass file bugs to fix this
issue.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.


Reply to: