diff options
Diffstat (limited to 'debian/libreoffice-common.postinst.in')
-rw-r--r-- | debian/libreoffice-common.postinst.in | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/libreoffice-common.postinst.in b/debian/libreoffice-common.postinst.in new file mode 100644 index 000000000..dd95adf44 --- /dev/null +++ b/debian/libreoffice-common.postinst.in @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +#INCLUDE_SHELL_LIB# + +if [ "$1" = "triggered" ]; then + for triggername in $2; do + case "$triggername" in + # new "bundled" extensions (since 3.3) + "/@OODIR@/share/extensions") + make_lo_sync_extensions + ;; + "/@OODIR@") + # check also whether /usr/bin/loolwsd-systemplate-setup + # is +x do to not fail when it's gone but + # /var/lib/lool/systemplate is still there (loolwsd + # removed but not purged) + if [ -x /usr/bin/loolwsd-systemplate-setup -a \ + -d /var/lib/lool/systemplate ]; then + update_lool_systemplate + fi + ;; + esac + done +fi + +#DEBHELPER# + +# do this manually since dpkg-maintscript-helper dir_to_symlink +# does not work reliably in this case because we cannot ensure that all +# conflicting packages previously shipping files in +# /usr/lib/libreoffice/share/registry are either upgraded or removed +# but not just deconfigured, see #985297 +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "1:7.0.4-4~" ; then + if [ ! -L /usr/lib/libreoffice/share/registry ]; then + if [ -d /usr/lib/libreoffice/share/registry ]; then + # this will fail if the directory is not yet empty + rmdir -v /usr/lib/libreoffice/share/registry + fi + ln -sfvT /etc/libreoffice/registry /usr/lib/libreoffice/share/registry + fi +fi |