Ticket #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/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
Note: See
TracTickets for help on using
tickets.
