On Sun, Jul 10, 2011 at 05:04:45PM -0500, Jonathan Nieder wrote:
> 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". 

Correct. For me. As I wrote this.

> How, after explicitly describing an upgrade path triggering the problem,

Where? cupt? See my other reply. Impossible to test here.

> could you believe it was impossible to reproduce?

Unreproducible *for the maintainer*. I.e. me. That's the f* definition
of "unreproducible". At that time it just was that. (And actually still
is, see my other reply, but anyway)

> Here is the fix I had been working on.  I tried fetching from the

Thanks. At least something constructive.

> packaging repo and did not find anything so I can't compare it to
>  your fix (which was probably similar).

Yeah, didn't push it yet, because I was testing it right now.

> 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
>  

Is there any reason against just calling the correct functions? I mean,
what if the trigger once did more stuff we don't want it here at that
place?

> 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

Hmm. Do we really need to invoke the trigger manually here? As the trigger
is supposed to run at the end -core (and eventual other packages) are unpacked
and the stuff is there and then merged.

> 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

<nitpick>-f is probably better</nitpick>

> +             # 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

OK, I had the whole actions inside a if [ -f ], but basically it's the same.

Grüße/Regards,

René



--
To UNSUBSCRIBE, email to debian-openoffice-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110710223420.ga31...@rene-engelhard.de

Reply via email to