From gunnarhj at ubuntu.com Sat Jun 16 08:23:46 2018 From: gunnarhj at ubuntu.com (Gunnar Hjalmarsson) Date: Sat, 16 Jun 2018 09:23:46 +0200 Subject: [Debian-in-workers] Bug#866051: fonts-guru-extra: upgrade does not clean up obsoleted directories References: <149852082426.15358.1681139953934858878.reportbug@hysteria.proulx.com> Message-ID: <11f12e6f-3672-3499-4ccd-8a2d8b53f76e@ubuntu.com> Want to mention that we have fixed this in Ubuntu for fonts-guru-extra as well as fonts-{beng,deva,gujr,orya}-extra. We used preinst scripts; please see the attached example. -- Gunnar Hjalmarsson https://launchpad.net/~gunnarhj -------------- next part -------------- #!/bin/sh set -e broken_dir=/etc/fonts/conf.avail/65-0-fonts-guru-extra.conf if dpkg --compare-versions "$2" lt-nl 2.0-4ubuntu2 \ && [ -d "$broken_dir" ]; then # wonderful hack to replace a wrong directory with a conffile. mv "$broken_dir" "$broken_dir".tmp mv "$broken_dir.tmp/65-0-fonts-guru-extra.conf" /etc/fonts/conf.avail rmdir --ignore-fail-on-non-empty "$broken_dir".tmp fi #DEBHELPER#