Ticket #1527 (closed defect: invalid)

Opened 16 months ago

Last modified 16 months ago

extensions/postgis/topology/Makefile.in uses non-POSIX [[ in makefile

Reported by: gdt Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: build/upgrade/install Version: trunk
Keywords: Cc:

Description

The [[ construct is beyond POSIX specifications, and not all shells implement it. Even if so, there is no standard for the behavior.

The following diff helps, but because there are underlying issues with revisions not being numeric, it doesn't work (but I think it fixes the [[ issue).

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 9010)
+++ Makefile.in	(working copy)
@@ -72,14 +72,14 @@
 sql_minor_upgrade: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/topology_upgrade_minor.sql sql_bits/topology_comments.sql ../postgis_extension_helper_uninstall.sql
 	if test "$(PREREL_NUMBER)x" != "x"; then \
 	   v=$(PREREL_PREV); \
-	   while [[ $$v -ge 1 ]]; do \
+	   while [ "$$v" -ge 1 ]; do \
 	       cat $< > sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql; \
 	       v=$$(($$v-1)); \
 	     done; \
 	else \
 	  if test $(MICRO_NUMBER) -gt 0; then \
 	   v=0; \
-	   while [[ $$v -le $(MICRO_PREV) ]]; do \
+	   while [ "$$v" -le "$(MICRO_PREV)" ]; do \
            cat $< > sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql; \
 	       v=$$(($$v+1)); \
 	    done; \

Change History

Changed 16 months ago by gdt

The same issue applies to extensions/postgis/Makefile.in

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 gdt

With the fix in ticket:1534, this patch is confirmed to work.

Changed 16 months ago by pramsey

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

Also invalided by a change in the approach using extensions/upgradeable_versions.mk

Note: See TracTickets for help on using tickets.