Opened 13 years ago

Closed 13 years ago

#1534 closed defect (invalid)

revision parsing fails with revisions like 2.0.0alpha4SVN

Reported by: gdt Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: build Version: master
Keywords: Cc:

Description

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@.@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@.@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)
 

Change History (2)

comment:1 by gdt, 13 years ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to strk

comment:2 by pramsey, 13 years ago

Resolution: invalid
Status: newclosed

This is invalided by a fix I did earlier to just stop trying to automagically figure this shit out and instead read a list of previous versions from ./extensions/upgradeable_versions.mk

Note: See TracTickets for help on using tickets.