Bug#738273: qgis-providers-common: fails to install, should use triggers for crssync
On 02/10/2014 12:08 AM, Andreas Beckmann wrote: 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. I'll take a look. Is the debdiff you sent also already in git somewhere? That would make it easier for me to experiment. Yes, the changes are in my personal git repo for the time being. I heavily rebase this repo before pushing the changes to Alioth, so it's not the best repo to clone from. Pulling updates won't work most of the time. http://git.linuxminded.nl/?p=pkg-grass/qgis As I have no idea what your packages do, please give me a bit more information about /usr/lib/qgis/crssync. It updates a srs.db - where does it look for input files? hardcoded directory(ies) (which?) or from config file (which?) The srs.db is updated with the CRS data from GDAL and PROJ.4. crssync uses the csv and wkt files shipped in libgdal1h: /usr/share/gdal/1.10/gcs.csv /usr/share/gdal/1.10/pcs.csv /usr/share/gdal/1.10/vertcs.csv /usr/share/gdal/1.10/compdcs.csv /usr/share/gdal/1.10/geoccs.csv /usr/share/gdal/1.10/epsg.wkt (the wkts it includes no longer exist) The paths are not hardcoded, only the file basename is. The full path is looked up using CPLFindFile() which is a function from libgdal. From reading the source (QgsCoordinateReferenceSystem::syncDb() in src/core/qgscoordinatereferencesystem.cpp), http://hub.qgis.org/issues/5282 where crssync is added to qgis-providers-common.postinst, and http://hub.qgis.org/issues/3645 where crssync was initially introduced, it also uses the EPSG list from Proj.4 via the proj API. /usr/share/proj/epsg The EPSG list from Proj.4 is included in proj-data which is a dependency of libproj0. I chose to go with the named trigger first because I envision the gdal and proj4 packages to activate this trigger too in their postinst when their data is updated. Kind Regards, Bas -- GnuPG: 0xE88D4AF1 (new) / 0x77A975AD (old) ___ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel
Bug#738273: qgis-providers-common: fails to install, should use triggers for crssync
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 ___ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel