
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.
16 lines
373 B
Bash
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
|