On 2014-02-09 22:52, Sebastiaan Couwenberg wrote: > When I upgrade the the qgis 2.0.1-1 packages currently in unstable to > 2.0.1-2 from my local repo the triggers are never run. > > The trigger is only run when I `dpkg -i` > qgis-providers-common_2.0.1-2_all.deb from the apt archives cache after > wards.
Attached patch hasn't been tested, yet. The trigger stuff can be simplified :-) And no need to distinguish different triggers until you need to. You need to activate the trigger also by installing the package providing the trigger either with an explicit dpkg-trigger in the postinst or by just running the trigger in in the postinst. If qgis-providers-common triggers something that is not being awaited for (because qgis-providers is not yet unpackaged or configured), the trigger is lost (well, it triggered nothing, so nothing to do). > Using a file based trigger on the srs.db may be an option, then we'll No need to, and if the directory is rather dynamic, not a good idea. Andreas
>From a11190096054caba491be58c0128029a9b7fea73 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann <a...@debian.org> Date: Mon, 10 Feb 2014 12:35:03 +0100 Subject: [PATCH] simplify trigger --- debian/qgis-providers.postinst | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/debian/qgis-providers.postinst b/debian/qgis-providers.postinst index 6216906..698766a 100644 --- a/debian/qgis-providers.postinst +++ b/debian/qgis-providers.postinst @@ -1,18 +1,10 @@ #!/bin/sh set -e -if [ "$1" = "triggered" ]; then - for trigger in $2; do - case "$trigger" in - "qgis-crssync") - if [ -w /usr/share/qgis/resources/srs.db ] && [ -x /usr/lib/qgis/crssync ]; then - /usr/lib/qgis/crssync - fi - ;; - esac - done - - exit 0 +if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then + if [ -w /usr/share/qgis/resources/srs.db ] && [ -x /usr/lib/qgis/crssync ]; then + /usr/lib/qgis/crssync + fi fi #DEBHELPER# -- 1.8.5.3