[Pkg-fonts-devel] Bug#689108: ttf-unfonts-core: does not properly remove old conffile on upgrade

Andreas Beckmann debian at abeckmann.de
Sat Sep 29 08:33:47 UTC 2012


Package: ttf-unfonts-core
Version: 1.0.2-080608-6
Severity: important
User: debian-qa at lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package fails to properly
remove the old conffile /etc/fonts/conf.avail/90-ttf-unfonts-core.conf
during upgrades from squeeze to wheezy. It's deleted by the
fonts-unfonts-core but debsums will report a missing file afterwards.

A proper solution would be to use dpkg-maintscript-helper, and if you
use a debhelper based build system putting the following into
debian/ttf-unfonts-core.maintscript should do the job:

    rm_conffile /etc/fonts/conf.avail/90-ttf-unfonts-core.conf 1.0.2-080608-7~

(assuming the next upload would be 1.0.2-080608-7, in case of a NMU
1.0.2-080608-6.1 use 1.0.2-080608-6.1~ as an argument)

Actually it would be more correct to rename instead of delete the
conffile, but proper takeover of conffiles (maybe including renaming) is
not well implemented so far, see e.g.  http://bugs.debian.org/595112

fonts-unfonts-core should not need to handle this file in its preinst.
In case the package manager decides to remove ttf-unfonts-core (instead
of upgrading it) and to install the new fonts-unfonts-core package, the
old conffile may be laying around in fonts/conf.avail/ (until
ttf-unfonts-core is purged) - which should be harmless, as it's no
longer linked into fonts/conf.d/

The defoma hints cleanup in fonts-unfonts-core.preinst looks wrong, e.g.
there is a test against version 20090104-5 which is far in the future of
1.0.2-080608-3 (squeeze) or 1.0.2-080608-6 (wheezy/sid). But this code
has been taken over unchanged from the ttf-unfonts-core.preinst in
squeeze, so it should be save to just drop it, as there seems to be no
need to continue doing this cleanup post-squeeze.


debsums reports modification of the following files,
from the attached log (scroll to the bottom...):

  debsums: missing file /etc/fonts/conf.avail/90-ttf-unfonts-core.conf (from ttf-unfonts-core package)


Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ttf-unfonts-core_1.0.2-080608-6.log.gz
Type: application/x-gzip
Size: 20002 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/attachments/20120929/b00d3750/attachment-0001.bin>


More information about the Pkg-fonts-devel mailing list