[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

./packages/openofficeorg/3.1.1/unstable r1681: * debian/shell-lib.sh: check whether OOo is running before (de-)registering



------------------------------------------------------------
revno: 1681
committer: Rene Engelhard <rene@debian.org>
branch nick: unstable
timestamp: Tue 2009-09-29 13:08:34 +0200
message:
    * debian/shell-lib.sh: check whether OOo is running before (de-)registering
      extensions or components (closes: #548721, #546723)
    * debian/templates, debian/po: add debconf error shown when OOo is running
added:
  po/
  po/POTFILES.in
  po/de.po
  po/templates.pot
  templates
modified:
  changelog
  control
  control.in
  control.kde.in
  control.mediawiki.in
  control.minimizer.in
  control.mysql.in
  control.pdfimport.in
  control.presenter.in
  control.reportdesign.in
  rules
  shell-lib.sh
=== modified file 'changelog'
--- a/changelog	2009-09-29 06:46:02 +0000
+++ b/changelog	2009-09-29 11:08:34 +0000
@@ -18,6 +18,9 @@
     - remove bogus (.*på engelsk) from GSI_da to fix some functions
       (closes: #548608)
   * debian/control.mysql.in: remove bogus conflicts, add Homepage:
+  * debian/shell-lib.sh: check whether OOo is running before (de-)registering
+    extensions or components (closes: #548721, #546723)
+  * debian/templates, debian/po: add debconf error shown when OOo is running
 
  -- Rene Engelhard <rene@debian.org>  Tue, 29 Sep 2009 08:37:49 +0200
 

=== modified file 'control'
--- a/control	2009-09-24 16:12:09 +0000
+++ b/control	2009-09-29 11:08:34 +0000
@@ -368,7 +368,7 @@
 Package: openoffice.org-evolution
 Architecture: i386 powerpc mips mipsel armel s390 m68k amd64 ia64 ppc64 s390x
 Section: gnome
-Pre-Depends: openoffice.org-core (>= 1:3.1.0-2)
+Pre-Depends: openoffice.org-core (>= 1:3.1.0-2), debconf (>= 0.5) | debconf-2.0
 Depends: openoffice.org-core (= ${binary:Version}), openoffice.org-base, ${shlibs:Depends}, ${libebook-dep}, ${misc:Depends}
 Recommends: evolution
 Conflicts: openoffice.org2-evolution (<< ${binary:Version})
@@ -383,7 +383,7 @@
 
 Package: openoffice.org-emailmerge
 Architecture: all
-Pre-Depends: ${python:Depends}, python-uno
+Pre-Depends: ${python:Depends}, python-uno, openoffice.org-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${misc:Depends}
 Enhances: openoffice.org-writer
 Replaces: python-uno (<< 1:2.4.1-5)
@@ -3292,7 +3292,7 @@
 Package: openoffice.org-wiki-publisher
 Section: misc
 Architecture: all
-Pre-Depends: openoffice.org-java-common (>= 1:2.4.0), ${java-runtime-depends}
+Pre-Depends: openoffice.org-java-common (>= 1:2.4.0), ${java-runtime-depends}, debconf (>= 0.5) | debconf-2.0
 Depends: ${mediawiki-jar-depends}, openoffice.org-core (>= 1:2.4.0-6), ${lucene-depends}, ${misc:Depends}
 Enhances: openoffice.org-writer
 Suggests: mediawiki
@@ -3307,7 +3307,7 @@
 Package: openoffice.org-report-builder
 Section: misc
 Architecture: all
-Pre-Depends: openoffice.org-java-common (>= ${base-version}), ${java-runtime-depends}
+Pre-Depends: openoffice.org-java-common (>= ${base-version}), ${java-runtime-depends}, debconf (>= 0.5) | debconf-2.0
 Depends: ${report-builder-jar-depends}, openoffice.org-report-builder-bin (>= 1:3.1.0~), ${misc:Depends}
 Conflicts: openoffice.org-reportdesigner, openoffice.org-java-common (>= ${base-version}.1)
 Replaces: openoffice.org-reportdesigner
@@ -3339,7 +3339,7 @@
 Package: openoffice.org-presentation-minimizer
 Section: misc
 Architecture: i386 powerpc mips mipsel armel s390 m68k amd64 ia64 ppc64 s390x
-Pre-Depends: openoffice.org-common
+Pre-Depends: openoffice.org-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.org-core (>= 2.3), openoffice.org-impress, ${misc:Depends}
 Enhances: openoffice.org-impress
 Description: OpenOffice.org extension for size-efficient presentations
@@ -3361,7 +3361,7 @@
 Conflicts: openoffice.org-presenter-screen
 Provides: openoffice.org-presenter-screen
 Replaces: openoffice.org-presenter-screen
-Pre-Depends: openoffice.org-common
+Pre-Depends: openoffice.org-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.org-core (>= 1:3.1.0~), openoffice.org-impress (>= 1:3.1.0~), ${misc:Depends}
 Enhances: openoffice.org-impress
 Description: OpenOffice.org Impress extension for a separate presenter's console
@@ -3386,7 +3386,7 @@
 Section: misc
 Priority: extra
 Architecture: i386 powerpc mips mipsel armel s390 m68k amd64 ia64 ppc64 s390x
-Pre-Depends: openoffice.org-common
+Pre-Depends: openoffice.org-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.org-core (>= 1:3.0.0~bea300~dev300m6), ${misc:Depends}
 Description: OpenOffice.org extension for importing PDF documents
  OpenOffice.org is a full-featured office productivity suite that provides
@@ -3481,7 +3481,7 @@
 
 Package: openoffice.org-kab
 Architecture: i386 powerpc mips mipsel armel s390 m68k amd64 ia64 ppc64 s390x
-Pre-Depends: openoffice.org-core (>= 1:3.1.0-2)
+Pre-Depends: openoffice.org-core (>= 1:3.1.0-2), debconf (>= 0.5) | debconf-2.0
 Depends: openoffice.org-core (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Recommends: kaddressbook
 Replaces: openoffice.org-kde (<= 1:3.0.0~beta2-1)
@@ -3510,7 +3510,7 @@
 Package: openoffice.org-mysql-connector
 Section: misc
 Architecture: i386 powerpc mips mipsel armel s390 m68k amd64 ia64 ppc64 s390x
-Pre-Depends: openoffice.org-common
+Pre-Depends: openoffice.org-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.org-core (>> 1:3.1~) ${misc:Depends}
 Suggests: mysql-server (>= 5.1)
 Homepage: http://wiki.services.openoffice.org/wiki/Database/Drivers/MySQL_Native

=== modified file 'control.in'
--- a/control.in	2009-09-24 16:12:09 +0000
+++ b/control.in	2009-09-29 11:08:34 +0000
@@ -637,7 +637,7 @@
 Package: openoffice.orgVER-evolution
 Architecture: %OOO_ARCHS%
 Section: gnome
-Pre-Depends: openoffice.orgVER-core (>= 1:3.1.0-2)
+Pre-Depends: openoffice.orgVER-core (>= 1:3.1.0-2), debconf (>= 0.5) | debconf-2.0
 Depends: openoffice.orgVER-core (= ${binary:Version}),
  openoffice.orgVER-base,
  ${shlibs:Depends},
@@ -656,7 +656,7 @@
 
 Package: openoffice.orgVER-emailmerge
 Architecture: all
-Pre-Depends: ${python:Depends}, python-uno
+Pre-Depends: ${python:Depends}, python-uno, openoffice.orgVER-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${misc:Depends}
 Enhances: openoffice.orgVER-writer
 Replaces: python-uno (<< 1:2.4.1-5)

=== modified file 'control.kde.in'
--- a/control.kde.in	2009-07-13 13:37:50 +0000
+++ b/control.kde.in	2009-09-29 11:08:34 +0000
@@ -25,7 +25,7 @@
 
 Package: openoffice.orgVER-kab
 Architecture: %OOO_ARCHS%
-Pre-Depends: openoffice.orgVER-core (>= 1:3.1.0-2)
+Pre-Depends: openoffice.orgVER-core (>= 1:3.1.0-2), debconf (>= 0.5) | debconf-2.0
 Depends: openoffice.orgVER-core (= ${binary:Version}),
  ${shlibs:Depends},
  ${misc:Depends}

=== modified file 'control.mediawiki.in'
--- a/control.mediawiki.in	2009-08-30 18:24:18 +0000
+++ b/control.mediawiki.in	2009-09-29 11:08:34 +0000
@@ -1,7 +1,7 @@
 Package: openoffice.orgVER-wiki-publisher
 Section: misc
 Architecture: all
-Pre-Depends: openoffice.orgVER-java-common (>= 1:2.4.0), ${java-runtime-depends}
+Pre-Depends: openoffice.orgVER-java-common (>= 1:2.4.0), ${java-runtime-depends}, debconf (>= 0.5) | debconf-2.0
 Depends: ${mediawiki-jar-depends}, openoffice.orgVER-core (>= 1:2.4.0-6), ${lucene-depends},
  ${misc:Depends}
 Enhances: openoffice.orgVER-writer

=== modified file 'control.minimizer.in'
--- a/control.minimizer.in	2009-08-30 18:24:18 +0000
+++ b/control.minimizer.in	2009-09-29 11:08:34 +0000
@@ -1,7 +1,7 @@
 Package: openoffice.orgVER-presentation-minimizer
 Section: misc
 Architecture: %OOO_ARCHS%
-Pre-Depends: openoffice.orgVER-common
+Pre-Depends: openoffice.orgVER-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.orgVER-core (>= 2.3), openoffice.orgVER-impress,
  ${misc:Depends}
 Enhances: openoffice.orgVER-impress

=== modified file 'control.mysql.in'
--- a/control.mysql.in	2009-09-16 13:28:47 +0000
+++ b/control.mysql.in	2009-09-29 11:08:34 +0000
@@ -1,7 +1,7 @@
 Package: openoffice.orgVER-mysql-connector
 Section: misc
 Architecture: %OOO_ARCHS%
-Pre-Depends: openoffice.orgVER-common
+Pre-Depends: openoffice.orgVER-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.orgVER-core (>> 1:3.1~)
  ${misc:Depends}
 Suggests: mysql-server (>= 5.1)

=== modified file 'control.pdfimport.in'
--- a/control.pdfimport.in	2009-08-01 20:19:17 +0000
+++ b/control.pdfimport.in	2009-09-29 11:08:34 +0000
@@ -2,7 +2,7 @@
 Section: misc
 Priority: extra
 Architecture: %OOO_ARCHS%
-Pre-Depends: openoffice.orgVER-common
+Pre-Depends: openoffice.orgVER-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.orgVER-core (>= 1:3.0.0~bea300~dev300m6),
  ${misc:Depends}
 Description: OpenOffice.org extension for importing PDF documents

=== modified file 'control.presenter.in'
--- a/control.presenter.in	2009-08-30 18:24:18 +0000
+++ b/control.presenter.in	2009-09-29 11:08:34 +0000
@@ -4,7 +4,7 @@
 Conflicts: openoffice.orgVER-presenter-screen
 Provides: openoffice.orgVER-presenter-screen
 Replaces: openoffice.orgVER-presenter-screen
-Pre-Depends: openoffice.orgVER-common
+Pre-Depends: openoffice.orgVER-common, debconf (>= 0.5) | debconf-2.0
 Depends: ${shlibs:Depends}, openoffice.orgVER-core (>= 1:3.1.0~), openoffice.orgVER-impress (>= 1:3.1.0~),
  ${misc:Depends}
 Enhances: openoffice.orgVER-impress

=== modified file 'control.reportdesign.in'
--- a/control.reportdesign.in	2009-06-10 07:32:34 +0000
+++ b/control.reportdesign.in	2009-09-29 11:08:34 +0000
@@ -1,7 +1,7 @@
 Package: openoffice.orgVER-report-builder
 Section: misc
 Architecture: all
-Pre-Depends: openoffice.org-java-common (>= ${base-version}), ${java-runtime-depends}
+Pre-Depends: openoffice.org-java-common (>= ${base-version}), ${java-runtime-depends}, debconf (>= 0.5) | debconf-2.0
 Depends: ${report-builder-jar-depends}, openoffice.orgVER-report-builder-bin (>= 1:3.1.0~),
  ${misc:Depends}
 Conflicts: openoffice.org-reportdesigner, openoffice.org-java-common (>= ${base-version}.1)

=== added directory 'po'
=== added file 'po/POTFILES.in'
--- a/po/POTFILES.in	1970-01-01 00:00:00 +0000
+++ b/po/POTFILES.in	2009-09-29 11:08:34 +0000
@@ -0,0 +1,1 @@
+[type: gettext/rfc822deb] templates

=== added file 'po/de.po'
--- a/po/de.po	1970-01-01 00:00:00 +0000
+++ b/po/de.po	2009-09-29 11:08:34 +0000
@@ -0,0 +1,44 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2009 Rene Engelhard <rene«debian.org>
+# This file is distributed under the same license as the openoffice.org package.
+# Rene Engelhard <rene«debian.org>, 2009
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: openoffice.org@packages.debian.org\n"
+"POT-Creation-Date: 2009-09-29 12:50+0200\n"
+"PO-Revision-Date: 2009-09-20 12:50+0200\n"
+"Last-Translator: Rene Engelhard <rene@debian.org>\n"
+"Language-Team: GERMAN <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid "OpenOffice.org running!"
+msgstr "OpenOffice.org läuft!"
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid ""
+"OpenOffice.org is running right now. A running OpenOffice.org makes "
+"extension (de-)registration not possible and it causes problems with (de-)"
+"registering components."
+msgstr ""
+"OpenOffice.org läuft momentan. Ein laufendes OpenOffice.org verhindert das "
+"registrieren und entfernen von Erweiterungen und es macht Probleme beim "
+"registrieren und entfernen von Komponenten."
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid ""
+"Please close OpenOffice.org (including a eventually running Quickstarter)."
+msgstr ""
+"Bitte schliessen Sie OpenOffice.org (inkl. einem evtl. laufenden "
+"Quickstarter)"

=== added file 'po/templates.pot'
--- a/po/templates.pot	1970-01-01 00:00:00 +0000
+++ b/po/templates.pot	2009-09-29 11:08:34 +0000
@@ -0,0 +1,39 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: openoffice.org@packages.debian.org\n"
+"POT-Creation-Date: 2009-09-29 12:50+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid "OpenOffice.org running!"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid ""
+"OpenOffice.org is running right now. A running OpenOffice.org makes "
+"extension (de-)registration not possible and it causes problems with (de-)"
+"registering components."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid ""
+"Please close OpenOffice.org (including a eventually running Quickstarter)."
+msgstr ""

=== modified file 'rules'
--- a/rules	2009-09-29 06:46:02 +0000
+++ b/rules	2009-09-29 11:08:34 +0000
@@ -1336,6 +1336,7 @@
 
 	rm -f l10n.fdupes
 	rm -f debian/shlibs.local
+	rm -f debian/*.templates
 
 	rm -f debian/openoffice.org-dev-doc.doc-base.*
 	rm -f debian/*.menu
@@ -2317,7 +2318,7 @@
 	# we don't need the share/xdgs except qstart
 	for f in `find debian -name '*.desktop' | grep xdg | grep -v qstart`; do \
 		rm -f $$f; done
-	for f in `find debian -name '*.desktop' ! -name "*soffice.od*`; do \
+	for f in `find debian -name '*.desktop' ! -name "*soffice.od*"`; do \
 		sed -i -e '/^Comment\[de\]/s/- *\([a-zA-Z0-9]*\) *macht.*glich.*$$/mit \1/' $$f; \
 		if ! grep -q X-KDE-Protocols $$f; then \
 			echo 'X-KDE-Protocols=file,http,smb,ftp,webdav' >> $$f; \
@@ -3111,6 +3112,11 @@
 		$(SOURCE_TREE)/instsetoo_native/util/OpenOffice/replace_file/*/00/README \
 		ooo-build/NEWS
 	dh_installdocs -plibmythes-dev debian/copyright
+	for p in pdfimport presenter-console mysql-connector filter-binfilter \
+		evolution kab sdbc-postgresql; do \
+		cat debian/templates > debian/openoffice.org-$$p.templates; \
+	done
+	dh_installdebconf -s
 	dh_installman -s
 	# fix manpage symlinks
 	for i in writer calc draw base math impress; do \
@@ -3345,6 +3351,10 @@
 	dh_installdocs -i -A debian/README.Debian \
 		$(SOURCE_TREE)/instsetoo_native/util/OpenOffice/replace_file/*/00/README \
 		ooo-build/NEWS
+	for p in emailmerge wiki-publisher report-builder; do \
+		cat debian/templates > debian/openoffice.org-$$p.templates; \
+	done
+	dh_installdebconf -i
 	dh_installman -i
 	for i in `find $(PKGDIR)-common -type l -name "o*.1"`; do \
 		mv $$i $$i.gz; \

=== modified file 'shell-lib.sh'
--- a/shell-lib.sh	2009-06-11 10:31:33 +0000
+++ b/shell-lib.sh	2009-09-29 11:08:34 +0000
@@ -9,6 +9,10 @@
   DEFCOLUMNS=80
 fi
 
+if [ -e /usr/share/debconf/confmodule ]; then
+	. /usr/share/debconf/confmodule
+fi
+
 message() {
 	echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
 }
@@ -52,13 +56,33 @@
     fi
 }
 
+check_for_running_ooo() {
+	if [ -e /usr/lib/openoffice/program/bootstraprc ]; then
+		LOCKFILE=`grep UserInstallation /usr/lib/openoffice/program/bootstraprc | cut -d= -f2 | sed -e 's,SYSUSERCONFIG,HOME,'`
+		if [ -x /usr/bin/pgrep ]; then
+		  PID=`/usr/bin/pgrep soffice.bin | head -n 1`
+		fi
+		if [ -n "$PID" ] || [ -e "$LOCKFILE" ]; then
+			db_input high openoffice.org/running
+			db_go
+			# try again in case OOo got closed before hitting OK
+			if [ -x /usr/bin/pgrep ]; then
+			  PID=`/usr/bin/pgrep soffice.bin | head -n 1`
+ 			fi
+			if [ -n "$PID" ] || [ -e "$LOCKFILE" ]; then
+			  exit $RET
+			fi
+		fi
+	fi
+}
+
 flush_unopkg_cache() {
 	/usr/lib/openoffice/program/unopkg list --shared > /dev/null 2>&1
 }
 
 remove_extension() {
+  check_for_running_ooo
   if /usr/lib/openoffice/program/unopkg list --shared $1 >/dev/null; then
-    echo -n "Removing extension $1..."
     INSTDIR=`mktemp -d`
     export PYTHONPATH="/@OOBASISDIR@/program"
     basis=`readlink /usr/lib/openoffice/basis-link`
@@ -67,13 +91,12 @@
       "-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
-    echo " done."
     flush_unopkg_cache
   fi
 }
 
 add_extension() {
-  echo -n "Adding extension $1..."
+  check_for_running_ooo
   INSTDIR=`mktemp -d`
   export PYTHONPATH="/@OOBASISDIR@/program"
   basis=`readlink /usr/lib/openoffice/basis-link`
@@ -82,10 +105,10 @@
     "-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
-  echo " done."
 }
 
 revoke_from_services_rdb() {
+  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
@@ -94,6 +117,7 @@
 }
 
 register_to_services_rdb() {
+  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
 }

=== added file 'templates'
--- a/templates	1970-01-01 00:00:00 +0000
+++ b/templates	2009-09-29 11:08:34 +0000
@@ -0,0 +1,8 @@
+Template: openoffice.org/running
+Type: error
+_Description: OpenOffice.org running!
+ OpenOffice.org is running right now. A running OpenOffice.org makes
+ extension (de-)registration not possible and it causes problems with
+ (de-)registering components.
+ .
+ Please close OpenOffice.org (including a eventually running Quickstarter).


Reply to: