2008/4/17 Rene Engelhard <[EMAIL PROTECTED]>:
>  Unfortunately I didn't think about/notice this either, but a etch->sid
>  dist-upgrade with openoffice.org-voikko involved now fails with the
>  scriplets using -env.

Yes, that's unfortunately true.

>  Option 2
>  --------
>  Policy 7.2 says you need a Pre-Depends for such cases...

I tried around with this last night for various rounds, and settled
now for this:
http://mentors.debian.net/debian/pool/main/o/openoffice.org-voikko/openoffice.org-voikko_2.2-3.dsc
debdiff attached.

I'm not sure if both -common (unopkg) and -core (unopkg.bin)
pre-dependencies are really needed, but I added them while trying to
find out the problems I had.

The problem I was having was that since the old voikko is removed
before the new one is installed, the new preinst is called with
install instead of upgrade. So I decided to remove the old voikko
extensions also when preinst is called with install, since postinst
anyway installs the new voikko again. One possible problematic
situation with more than one old voikko extensions was also resolved.

There is a remaining concern that since the old openoffice.org-core is
removed before the old openoffice.org-voikko, the old extension is not
removed by the old OOo. However, the new unopkg seems to do a fine job
removing the old extension, too, unlike maybe some time ago when OOo
was a bit more shaky about these things. So, currently with this
version I'm successfully having etch -> lenny upgrades (or, lenny + my
local ooo-voikko repo with this version). The new unopkg is usable at
the time ooo-voikko's preins tis called, old voikko version is removed
and new one is installed. The extension works, as does extensions
dialog in OOo (the dialog didn't start when the old voikko wasn't
removed properly).

Pre-Depends should be used sparingly, but it would seem like a good fit here.

-Timo

ps. dunno if gmail keeps X-Debbugs-Cc or not
diff -u openoffice.org-voikko-2.2/debian/copyright 
openoffice.org-voikko-2.2/debian/copyright
--- openoffice.org-voikko-2.2/debian/copyright
+++ openoffice.org-voikko-2.2/debian/copyright
@@ -4,13 +4,15 @@
 
 It was downloaded from
 
- http://downloads.sourceforge.net/voikko/openoffice.org-voikko-2.1.tar.gz
+ http://downloads.sourceforge.net/voikko/openoffice.org-voikko-2.2.tar.gz
 
 Upstream author: Harri Pitkänen <[EMAIL PROTECTED]>
 
 The Debian packaging is (C) 2006, Harri Pitkänen, Teemu Likonen 
 and Timo Jyrinki and is licensed under the GNU General Public License.
 
+Copyright (C) 2005-2008 Harri Pitkänen ([EMAIL PROTECTED])
+
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
diff -u openoffice.org-voikko-2.2/debian/control 
openoffice.org-voikko-2.2/debian/control
--- openoffice.org-voikko-2.2/debian/control
+++ openoffice.org-voikko-2.2/debian/control
@@ -8,6 +8,7 @@
 
 Package: openoffice.org-voikko
 Architecture: any
+Pre-Depends: openoffice.org-common (>= 1:2.3.0~oog680m1-1), 
openoffice.org-core (>= 1:2.3.0~oog680m1-1)
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: openoffice.org (>= 1:2.4.0~) | openoffice.org-writer (>= 1:2.4.0~) 
| openoffice.org-calc (>= 1:2.4.0~) | openoffice.org-impress (>= 1:2.4.0~) | 
openoffice.org-draw (>= 1:2.4.0~)
 Conflicts: ${misc:Conflicts}
diff -u openoffice.org-voikko-2.2/debian/preinst 
openoffice.org-voikko-2.2/debian/preinst
--- openoffice.org-voikko-2.2/debian/preinst
+++ openoffice.org-voikko-2.2/debian/preinst
@@ -21,9 +21,13 @@
 }
 
 case "$1" in
-       upgrade)
-               id=`/usr/lib/openoffice/program/unopkg list --shared | egrep 
'^(Name|Identifier):.*voikko' | cut -d":" -f2`
-               remove_extension $id
+       upgrade|install)
+               echo Removing old voikko extensions.
+               id=" "
+               while [ "$id" != ""  ]; do
+                       id=`/usr/lib/openoffice/program/unopkg list --shared | 
egrep '^(Name|Identifier):.*voikko' | cut -d":" -f2 | head -n 1`
+                       if [ "$id" != "" ]; then remove_extension $id; fi
+               done
        ;;
 esac
 
diff -u openoffice.org-voikko-2.2/debian/changelog 
openoffice.org-voikko-2.2/debian/changelog
--- openoffice.org-voikko-2.2/debian/changelog
+++ openoffice.org-voikko-2.2/debian/changelog
@@ -1,3 +1,11 @@
+openoffice.org-voikko (2.2-3) unstable; urgency=low
+
+  * Add Pre-Depends for etch -> lenny upgrades (Closes: #476573)
+  * Modify preinst to remove also multiple previous voikko extensions
+  * Fix lintian warning about debian/copyright phrasing
+
+ -- Timo Jyrinki <[EMAIL PROTECTED]>  Mon, 21 Apr 2008 00:26:02 +0300
+
 openoffice.org-voikko (2.2-2) unstable; urgency=low
 
   * Synchronize with upstream packaging:

Reply via email to