Bug#987913: libglib2.0-0: upgrade or reinstallation removes /usr/lib/<triplet>/gio/modules/ if empty

Andreas Beckmann anbe at debian.org
Sat May 1 22:54:16 BST 2021


Package: libglib2.0-0
Version: 
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package misses two
directories after an upgrade. These directories are shipped by the
package.

Any easy way to reproduce this is in a minimal chroot with only
libglib2.0-0 but no gio modules installed:

  apt-get install --reinstall libglib2.0-0

Piupart reports:

0m27.9s DEBUG: Starting command: ['chroot', '/srv/piuparts/tmp/tmpujqyat', 'tmp/scripts/pre_remove_40_find_missing_md5sums']
0m27.9s DUMP: 
  libglib2.0-0: MISSING OBJECT /usr/lib/x86_64-linux-gnu/gio
  libglib2.0-0: MISSING OBJECT /usr/lib/x86_64-linux-gnu/gio/modules
0m27.9s DEBUG: Command ok: ['chroot', '/srv/piuparts/tmp/tmpujqyat', 'tmp/scripts/pre_remove_40_find_missing_md5sums']

This is caused by the postrm script which unconditionally deletes
giomodule.cache and the path to it. During upgrade (or
reinstallation), dpkg will call

    old-postrm upgrade new-version

after the new package has been unpacked.

The two actions cleaning up (the path to) giomodule.cache
in postrm should probably be limited to 'remove' and 'purge'.

To properly recreate the missing directories after having
upgraded to a buggy version in the past, you need to mkdir -p
them in postinst. (The directories get deleted (again) by the
old postrm *after* the new package has been unpacked.)

Andreas



More information about the pkg-gnome-maintainers mailing list