Ticket #1534 (closed defect: invalid)

Opened 16 months ago

Last modified 16 months ago

revision parsing fails with revisions like 2.0.0alpha4SVN

Reported by: gdt Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: build/upgrade/install Version: trunk
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

Changed 16 months ago by gdt

  • owner changed from pramsey to strk
  • component changed from postgis to build/upgrade/install

Changed 16 months ago by pramsey

  • status changed from new to closed
  • resolution set to invalid

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.