> Rene Engelhard wrote:

>> Fuck off.

To lead the conversation in a more productive direction, the specific
part that led me to think you find this to be a marginal use case was
the "unreproducible".  How, after explicitly describing an upgrade
path triggering the problem, could you believe it was impossible to
reproduce?

Probably I misunderstood your intent.  I am sorry about that.

Here is the fix I had been working on.  I tried fetching from the
packaging repo and did not find anything so I can't compare it to
your fix (which was probably similar).

diff --git i/changelog w/changelog
index 00af19ff..2590edb3 100644
--- i/changelog
+++ w/changelog
@@ -1,3 +1,15 @@
+libreoffice (1:3.4.1-2) UNRELEASED; urgency=low
+
+  * debian/libreoffice-core.postinst.in: trigger to make sure
+    update_services_rdb is run.
+  * debian/shell-lib-components.sh: let update_services_rdb() defer
+    action until .services.rdb is unpacked.
+  * debian/libreoffice-common.postinst.in configure: trigger self
+    instead of running sync_extensions/update_services_rdb directly,
+    so those updates can be deferred to the end of the dpkg run.
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Sun, 10 Jul 2011 17:03:00 -0500
+
 libreoffice (1:3.4.1-1) experimental; urgency=low
 
   * new upstream release
diff --git i/libreoffice-common.postinst.in w/libreoffice-common.postinst.in
index 56b9edce..03aea359 100644
--- i/libreoffice-common.postinst.in
+++ w/libreoffice-common.postinst.in
@@ -36,10 +36,10 @@ if [ "$1" = "configure" ]; then
        rmdir /etc/openoffice 2>/dev/null || true
 
        if dpkg --compare-versions "$2" lt "1:3.3.0-3"; then
-               sync_extensions
+               dpkg-trigger "/@OOBRANDDIR@/share/extensions"
        fi
        if dpkg --compare-versions "$2" lt "1:3.4.0-1"; then
-               update_services_rdb
+               dpkg-trigger "/@OOBASISDIR@/registered-components"
        fi
 fi
 
diff --git i/libreoffice-core.postinst.in w/libreoffice-core.postinst.in
index e69de29b..cbf8ec59 100644
--- i/libreoffice-core.postinst.in
+++ w/libreoffice-core.postinst.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+       if dpkg --compare-versions "$2" lt "1:3.4.0-1"; then
+               dpkg-trigger /@@OOBASISDIR@/registered-components
+       fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git i/shell-lib-components.sh w/shell-lib-components.sh
index 06f48161..d5224345 100644
--- i/shell-lib-components.sh
+++ w/shell-lib-components.sh
@@ -42,6 +42,11 @@ register_to_services_rdb() {
 }
 
 update_services_rdb() {
+       if ! [ -e /@OOBASISDIR@/program/.services.rdb ]; then
+               # Wait for libreoffice-core 3.4.0 to be unpacked.
+               return
+       fi
+
        echo "Updating services.rdb..."
        rdb="`echo /@OOBASISDIR@/program | sed -e s/usr/var/`/services.rdb"
        if [ -d /@OOBASISDIR@/registered-components ]; then



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to