Greetings,
I have analyzed this bug and found a fix.

The faulty symlink is caused by that there are two different postgis versions stated in the package. One general in Version.config, and one specifically for JDBC in java/jdbc/pom.xml.

However, the debian/rules file uses a single variable POSTGIS_VERSION retrieved from Version.config for both of these, ignoring the value for JDBC.

The attached patch retrieves a new variable POSTGIS_JDBC_VERSION from java/jdbc/pom.xml and uses it in the creation of the symlink which now works.


Furthermore this bug blocks debbug #713278 (Osmosis FTBFS). If one manages to workaround the Checkstyle version being too recent, it instead fails to build as postgis can't be found due to this incorrect symlink.


Regards,
Anders Jonsson
--- debian/rules        2014-01-23 17:26:35.000000000 +0100
+++ debian/rules        2014-02-26 21:27:43.067459182 +0100
@@ -242,7 +242,11 @@
 
 #      Link the resulting JAR file, so it's available via it's old
 #      name. (Even if postgis-jdbc.jar might be more appropriate.)
-       ln -sf postgis-jdbc-$(POSTGIS_VERSION).jar \
+       POSTGIS_JDBC_MAJOR_VERSION=$(shell cat java/jdbc/pom.xml | grep 
"<POSTGIS_MAJOR_VERSION>" | cut -d ">" -f2 | cut -d "<" -f1); \
+       POSTGIS_JDBC_MINOR_VERSION=$(shell cat java/jdbc/pom.xml | grep 
"<POSTGIS_MINOR_VERSION>" | cut -d ">" -f2 | cut -d "<" -f1); \
+       POSTGIS_JDBC_MICRO_VERSION=$(shell cat java/jdbc/pom.xml | grep 
"<POSTGIS_MICRO_VERSION>" | cut -d ">" -f2 | cut -d "<" -f1); \
+       
POSTGIS_JDBC_VERSION=$$POSTGIS_JDBC_MAJOR_VERSION.$$POSTGIS_JDBC_MINOR_VERSION.$$POSTGIS_JDBC_MICRO_VERSION;
 \
+       ln -sf postgis-jdbc-$$POSTGIS_JDBC_VERSION.jar \
                $(CURDIR)/debian/libpostgis-java/usr/share/java/postgis.jar
 
 install-arch: build-arch

Reply via email to