------------------------------------------------------------ revno: 1708 committer: Rene Engelhard <r...@debian.org> branch nick: unstable timestamp: Fri 2009-10-16 14:33:56 +0200 message: * debian/shell-lib-{components,extensions}.sh: check for known OOo-using services (docvert-openoffice.org) and stop/start them modified: changelog shell-lib-components.sh shell-lib-extensions.sh
=== modified file 'changelog' --- a/changelog 2009-10-16 11:43:31 +0000 +++ b/changelog 2009-10-16 12:33:56 +0000 @@ -16,6 +16,8 @@ * debian/shell-lib.sh, debian/shell-lib*.sh, debian/*.lintian-overrides*, debian/rules: only add the functions needed to the respective maintainer scripts to prevent some bad side-effects, thanks Steve Langasek... + * debian/shell-lib-{components,extensions}.sh: check for known OOo-using + services (docvert-openoffice.org) and stop/start them -- Rene Engelhard <r...@debian.org> Wed, 14 Oct 2009 08:54:36 +0200
=== modified file 'shell-lib-components.sh' --- a/shell-lib-components.sh 2009-10-14 07:00:58 +0000 +++ b/shell-lib-components.sh 2009-10-16 12:33:56 +0000 @@ -14,17 +14,34 @@ fi } +handle_soffice_listeners() { + services="docvert-converter" + for s in $services; do + if [ -x /etc/init.d/$s ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $s $1 + else + /etc/init.d/$s $1 + fi + fi + done +} + revoke_from_services_rdb() { + handle_soffice_listeners stop check_for_running_ooo rdb="`echo /@OOBASISDIR@/program | sed -e s/usr/var/`/services.rdb" lib="`basename $1`" if [ -e "$rdb" ] && /usr/lib/ure/bin/regview $rdb | grep -q $lib; then /usr/lib/ure/bin/regcomp -revoke -r $rdb -br $rdb -c file://$1 fi + handle_soffice_listeners start } register_to_services_rdb() { + handle_soffice_listeners stop check_for_running_ooo rdb="`echo /@OOBASISDIR@/program | sed -e s/usr/var/`/services.rdb" /usr/lib/ure/bin/regcomp -register -r $rdb -br $rdb -c file://$1 + handle_soffice_listeners start } === modified file 'shell-lib-extensions.sh' --- a/shell-lib-extensions.sh 2009-10-14 07:00:58 +0000 +++ b/shell-lib-extensions.sh 2009-10-16 12:33:56 +0000 @@ -14,11 +14,25 @@ fi } +handle_soffice_listeners() { + services="docvert-converter" + for s in $services; do + if [ -x /etc/init.d/$s ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $s $1 + else + /etc/init.d/$s $1 + fi + fi + done +} + flush_unopkg_cache() { /usr/lib/openoffice/program/unopkg list --shared > /dev/null 2>&1 } remove_extension() { + handle_soffice_listeners stop check_for_running_ooo if /usr/lib/openoffice/program/unopkg list --shared $1 >/dev/null; then INSTDIR=`mktemp -d` @@ -31,9 +45,11 @@ if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi flush_unopkg_cache fi + handle_soffice_listeners start } add_extension() { + handle_soffice_listeners stop check_for_running_ooo INSTDIR=`mktemp -d` export PYTHONPATH="/@OOBASISDIR@/program" @@ -43,4 +59,5 @@ "-env:UNO_JAVA_JFW_INSTALL_DATA=file:///var/lib/openoffice/$basis/share/config/javasettingsunopkginstall.xml" \ "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1" if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi + handle_soffice_listeners start }