gtk3/debian/libgtk-3-0t64.postrm.in
Simon McVittie 2b8a8fa010 d/libgtk-3-0t64.postrm: Avoid recurrence of #1065494 in the future
If at some point in the future we have another transition as extensive
as time64, then libgtk-3-0t64 could conceivably be replaced by some
other package, which I have modelled here as libgtk-3-0xyz. If that
happens, we need to avoid deletion of immodules.cache, otherwise we
will have another bug similar to #1065494.

This implementation is based on the assumption that third-party input
method modules for GTK 3 will depend on GTK 3, therefore we should not
need to clean up the IM modules cache unless/until we reach the point
of having no IM modules installed.
2024-03-06 11:22:32 +00:00

16 lines
373 B
Bash

#!/bin/sh
set -e
#DEBHELPER#
case "$1" in
(purge)
if [ -d /@MODULES_BASE_PATH@ ] && ! [ -e /@MODULES_BASE_PATH@/immodules ]; then
# Purge the cache, but only do this if no more IM modules exist.
rm -f /@MODULES_BASE_PATH@/immodules.cache
rmdir -p --ignore-fail-on-non-empty /@MODULES_BASE_PATH@
fi
;;
esac