Skip to contentSkip to conversation

tzdata: Reorder zone list to avoid missing links

PATCH Superseded Michel Marti 3 participants 4 messages Apr 6, 2016 – Apr 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tzdata: Reorder zone list to avoid missing links

The 'backward' zone references entries from other zones (e.g. Pacific/*) that have not yet been compiled, leading to missing links. To fix this, take-over the zone list sort order from upstream 'tzdata' and also ensure that make fails if zic terminates with a non-zero exit code.

---
 package/tzdata/tzdata.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/tzdata/tzdata.mk +4 -4
index 1b3efb4..40ddc4b 100644
@@ -13,8 +13,8 @@ HOST_TZDATA_DEPENDENCIES = host-zic
 TZDATA_LICENSE = Public domain
 
 TZDATA_DEFAULT_ZONELIST = \
-	africa antarctica asia australasia backward etcetera \
-	europe factory northamerica pacificnew southamerica
+	africa antarctica asia australasia europe northamerica \
+	southamerica pacificnew etcetera backward systemv factory
 
 ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
 TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
@@ -49,8 +49,8 @@ endef
 define HOST_TZDATA_BUILD_CMDS
 	(cd $(@D); \
 		for zone in $(TZDATA_ZONELIST); do \
-			$(ZIC) -d _output/posix -y yearistype.sh $$zone; \
-			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \
+			$(ZIC) -d _output/posix -y yearistype.sh $$zone || exit 1; \
+			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone || exit 1; \
 		done; \
 	)
 endef
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 tzdata: Reorder zone list to avoid missing links

Quoted 15 lines · Michel Marti

The 'backward' zone references entries from other zones (e.g. Pacific/*) that have not yet been compiled, leading to missing links. To fix this, take-over the zone list sort order from upstream 'tzdata' and also ensure that make fails if zic terminates with a non-zero exit code.

---
  package/tzdata/tzdata.mk | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
package/tzdata/tzdata.mk +0 -0
index 1b3efb4..40ddc4b 100644

package/tzdata/tzdata.mk HOST_TZDATA_DEPENDENCIES = host-zic · line 17

Quoted 7 lines
package/tzdata/tzdata.mk +2 -2
@@ -13,8 +13,8 @@ HOST_TZDATA_DEPENDENCIES = host-zic
  TZDATA_LICENSE = Public domain
 
  TZDATA_DEFAULT_ZONELIST = \
-	africa antarctica asia australasia backward etcetera \
-	europe factory northamerica pacificnew southamerica
+	africa antarctica asia australasia europe northamerica \
+	southamerica pacificnew etcetera backward systemv factory

Could you add a comment to clarify that the order is important? Otherwise we
risks that someone tries to sort it alphabetically again a few years down the line. Your commit message explains is pretty well.

With that you can add my

package/tzdata/tzdata.mk endef · line 50

Quoted 6 lines
package/tzdata/tzdata.mk +0 -0
  ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
  TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
@@ -49,8 +49,8 @@ endef
  define HOST_TZDATA_BUILD_CMDS
  	(cd $(@D); \

A simpler way to achieve the same is to add

		set -e; \

but that's a matter of taste so if you keep it as is that's fine by me.

Regards,
Arnout

Quoted 9 lines
package/tzdata/tzdata.mk +2 -2
  		for zone in $(TZDATA_ZONELIST); do \
-			$(ZIC) -d _output/posix -y yearistype.sh $$zone; \
-			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \
+			$(ZIC) -d _output/posix -y yearistype.sh $$zone || exit 1; \
+			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone || exit 1; \
  		done; \
  	)
  endef
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

PATCH v2 1/1 tzdata: Reorder zone list to avoid missing links

In reply to Michel Marti

The 'backward' zone references entries from other zones (e.g. Pacific/*) that have not yet been compiled, leading to missing links. To fix this, take-over the zone list sort order from upstream 'tzdata' and also ensure that make fails if zic terminates with a non-zero exit code.

---
 package/tzdata/tzdata.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
package/tzdata/tzdata.mk +6 -4
index 1b3efb4..948ab4f 100644
@@ -12,9 +12,11 @@ TZDATA_DEPENDENCIES = host-tzdata
 HOST_TZDATA_DEPENDENCIES = host-zic
 TZDATA_LICENSE = Public domain
 
+# Take care when re-ordering this list since this might break zone
+# dependencies
 TZDATA_DEFAULT_ZONELIST = \
-	africa antarctica asia australasia backward etcetera \
-	europe factory northamerica pacificnew southamerica
+	africa antarctica asia australasia europe northamerica \
+	southamerica pacificnew etcetera backward systemv factory
 
 ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
 TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
@@ -49,8 +51,8 @@ endef
 define HOST_TZDATA_BUILD_CMDS
 	(cd $(@D); \
 		for zone in $(TZDATA_ZONELIST); do \
-			$(ZIC) -d _output/posix -y yearistype.sh $$zone; \
-			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \
+			$(ZIC) -d _output/posix -y yearistype.sh $$zone || exit 1; \
+			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone || exit 1; \
 		done; \
 	)
 endef
Signature · 1 line
2.8.1
#3 lore raw

PATCH v2 1/1 tzdata: Reorder zone list to avoid missing links

Hello,

Quoted 10 lines · Michel Marti

The 'backward' zone references entries from other zones (e.g. Pacific/*) that have not yet been compiled, leading to missing links. To fix this, take-over the zone list sort order from upstream 'tzdata' and also ensure that make fails if zic terminates with a non-zero exit code.

---
 package/tzdata/tzdata.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com