[postgis-devel] [PostGIS] #1534: revision parsing fails with revisions like 2.0.0alpha4SVN
PostGIS
trac at osgeo.org
Thu Feb 2 19:39:11 PST 2012
#1534: revision parsing fails with revisions like 2.0.0alpha4SVN
---------------------+------------------------------------------------------
Reporter: gdt | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
In extensions, the regular expressions for pulling out micro versions do
not cope with versions containing SVN (or alpha vs a).
{{{
Index: extensions/postgis_topology/Makefile.in
===================================================================
--- extensions/postgis_topology/Makefile.in (revision 9013)
+++ extensions/postgis_topology/Makefile.in (working copy)
@@ -2,11 +2,11 @@
EXTVERSION = @POSTGIS_LIB_VERSION@
MINORVERSION = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
-MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed
"s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/")
+MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed
"s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*[SVN]*/\1/")
PREREL_NUMBER = $(shell echo $(EXTVERSION) | \
sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \
grep "[a-zA-Z]" | \
- sed "s/[0-9][a-zA-Z]\([0-9]*\)[a-zA-Z]*/\1/")
+ sed "s/[0-9]*[a-zA-Z]*\([0-9]*\)[a-zA-Z]*/\1/")
MICRO_PREV = $(shell if test "$(MICRO_NUMBER)x" != "x"; then expr
$(MICRO_NUMBER) - 1; fi)
PREREL_PREV = $(shell if test "$(PREREL_NUMBER)x" != "x"; then expr
$(PREREL_NUMBER) - 1; fi)
Index: extensions/postgis/Makefile.in
===================================================================
--- extensions/postgis/Makefile.in (revision 9013)
+++ extensions/postgis/Makefile.in (working copy)
@@ -2,11 +2,11 @@
EXTVERSION = @POSTGIS_LIB_VERSION@
MINORVERSION = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
-MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed
"s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/")
+MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed
"s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*[SVN]*/\1/")
PREREL_NUMBER = $(shell echo $(EXTVERSION) | \
sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \
grep "[a-zA-Z]" | \
- sed "s/[0-9][a-zA-Z]\([0-9]*\)[a-zA-Z]*/\1/")
+ sed "s/[0-9]*[a-zA-Z]*\([0-9]*\)[a-zA-Z]*/\1/")
MICRO_PREV = $(shell if test "$(MICRO_NUMBER)x" != "x"; then expr
$(MICRO_NUMBER) - 1; fi)
PREREL_PREV = $(shell if test "$(PREREL_NUMBER)x" != "x"; then expr
$(PREREL_NUMBER) - 1; fi)
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1534>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list