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
Bug#738273: qgis-providers-common: fails to install, should use triggers for crssync
Hi Andreas, Thanks for reporting this issue. The srs.db provided by qgis-providers-common is updated by crssync included in qgis-providers. Because qgis-providers depends on qgis-providers-common, the common package will be configured first, and I think this will prevent the trigger in qgis-providers from running because that hasn't been installed yet. I've updated the qgis-providers-common.postinst to execute `dpkg-trigger qgis-crssync` instead of `/usr/lib/qgis/crssync`, added interest qgis-crssync in qgis-providers.triggers, and added handling for the qgis-crssync named trigger in qgis-providers.postinst. 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. Using a file based trigger on the srs.db may be an option, then we'll need to watch for changes to /usr/share/qgis/resources/srs-template.db which will be installed by dpkg whereas the srs.db is created from it in the postinst to fix #738117. I haven't tried the file based trigger yet, nor have I pushed my changes thus far because they don't fix the issue just yet. The trigger changes are included in the attached debdiff. I'll experiment with the file based trigger to see if that works. Kind Regards, Bas diff -Nru qgis-2.0.1/debian/changelog qgis-2.0.1/debian/changelog --- qgis-2.0.1/debian/changelog 2014-01-18 03:34:17.0 +0100 +++ qgis-2.0.1/debian/changelog 2014-02-09 16:52:22.0 +0100 @@ -1,3 +1,25 @@ +qgis (2.0.1-2) UNRELEASED; urgency=low + + [ Peter Michael Green ] + * Fix broken ARM patch by Konstantinos Margaritis. + * Fix qreal vs double issues with qmin and qmax. + + [ Jürgen E. Fischer ] + * run crssync on copy of srs.db +(closes: #738117) + + [ Bas Couwenberg ] + * Additional checks in qgis-providers-common.postinst + * Add patch to fix mis-detection of PostGIS table types. + * Add patch to not look for topology layers without topology support. + * Add patch to fix postgis topology availability detection query. + * Enable parallel builds. + * Add patch to disable features on ARM. + * Add qgis-crssync dpkg trigger to run crssync after installing the srs.db. +(closes: #738273) + + -- Bas Couwenberg sebas...@xs4all.nl Fri, 31 Jan 2014 19:42:03 +0100 + qgis (2.0.1-1) unstable; urgency=low [ Jürgen E. Fischer ] diff -Nru qgis-2.0.1/debian/patches/disable-features-on-arm.patch qgis-2.0.1/debian/patches/disable-features-on-arm.patch --- qgis-2.0.1/debian/patches/disable-features-on-arm.patch 1970-01-01 01:00:00.0 +0100 +++ qgis-2.0.1/debian/patches/disable-features-on-arm.patch 2014-02-09 12:53:16.0 +0100 @@ -0,0 +1,66 @@ +Description: Disable troublesome features on ARM. + Building QGIS on ARM produces the error: + + sip: qgis/python/core/qgsclipper.sip:44: \ + QgsClipper::trimFeature() unsupported function argument type - provide %MethodCode and a C++ signature + + In the upstream git repository this and other functions are disbled for + Android builds which have the same problems: + + https://github.com/qgis/QGIS/commit/2cc684793ceb29d8600d71564fb38f92c998f588 + +Author: Bas Couwenberg sebas...@xs4all.nl +Bug-Debian: http://bugs.debian.org/737814 + +--- a/python/core/qgsclipper.sip b/python/core/qgsclipper.sip +@@ -1,3 +1,5 @@ ++%Feature ARM ++ + class QgsClipper + { + %TypeHeaderCode +@@ -34,6 +36,7 @@ class QgsClipper + // A handy way to refer to the four boundaries + enum Boundary {XMax, XMin, YMax, YMin}; + ++%If (!ARM) + // Trims the given feature to a rectangular box. Returns the trimmed + // feature in x and y. The shapeOpen parameter determines whether + // the function treats the points as a closed shape (polygon), or as +@@ -41,7 +44,7 @@ class QgsClipper + static void trimFeature( QVectordouble x, + QVectordouble y, + bool shapeOpen ); +- ++%End + static void trimPolygon( QPolygonF pts, const QgsRectangle clipRect ); + + /**Reads a polyline from WKB and clips it to clipExtent +--- a/python/core/composer/qgscomposerscalebar.sip b/python/core/composer/qgscomposerscalebar.sip +@@ -104,9 +104,11 @@ class QgsComposerScaleBar: QgsComposerIt + /**Returns style name*/ + QString style() const; + ++%If (!ARM) + /**Returns the x - positions of the segment borders (in item coordinates) and the width + of the segment*/ + void segmentPositions( QListQPairdouble, double posWidthList ) const; ++%End + + /**Sets box size suitable to content*/ + void adjustBoxSize(); +--- a/python/CMakeLists.txt b/python/CMakeLists.txt +@@ -72,6 +72,10 @@ IF(PYQT4_VERSION_NUM LESS 264196) + SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QLISTCONSTPTR_CONVERSION) + ENDIF(PYQT4_VERSION_NUM LESS 264196) + ++IF(CMAKE_SYSTEM_PROCESSOR MATCHES ^arm) ++
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. I'll take a look. Is the debdiff you sent also already in git somewhere? That would make it easier for me to experiment. 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?) Andreas ___ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel