All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] tzdata: Reorder zone list to avoid missing links
@ 2016-04-06 10:41 Michel Marti
  2016-04-06 22:09 ` Arnout Vandecappelle
  2016-04-08  8:23 ` [Buildroot] [PATCH v2 " Michel Marti
  0 siblings, 2 replies; 4+ messages in thread
From: Michel Marti @ 2016-04-06 10:41 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Michel Marti <mma@objectxp.com>
---
 package/tzdata/tzdata.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index 1b3efb4..40ddc4b 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -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
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] tzdata: Reorder zone list to avoid missing links
  2016-04-06 10:41 [Buildroot] [PATCH 1/1] tzdata: Reorder zone list to avoid missing links Michel Marti
@ 2016-04-06 22:09 ` Arnout Vandecappelle
  2016-04-08  8:23 ` [Buildroot] [PATCH v2 " Michel Marti
  1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2016-04-06 22:09 UTC (permalink / raw)
  To: buildroot

On 04/06/16 12:41, Michel Marti wrote:
> 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.
>
> Signed-off-by: Michel Marti <mma@objectxp.com>
> ---
>   package/tzdata/tzdata.mk | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
> index 1b3efb4..40ddc4b 100644
> --- a/package/tzdata/tzdata.mk
> +++ b/package/tzdata/tzdata.mk
> @@ -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
  Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

>
>   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

>   		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
>


-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] tzdata: Reorder zone list to avoid missing links
  2016-04-06 10:41 [Buildroot] [PATCH 1/1] tzdata: Reorder zone list to avoid missing links Michel Marti
  2016-04-06 22:09 ` Arnout Vandecappelle
@ 2016-04-08  8:23 ` Michel Marti
  2016-04-19 21:16   ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Michel Marti @ 2016-04-08  8:23 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Michel Marti <mma@objectxp.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/tzdata/tzdata.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index 1b3efb4..948ab4f 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -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
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] tzdata: Reorder zone list to avoid missing links
  2016-04-08  8:23 ` [Buildroot] [PATCH v2 " Michel Marti
@ 2016-04-19 21:16   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-04-19 21:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  8 Apr 2016 10:23:27 +0200, Michel Marti wrote:
> 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.
> 
> Signed-off-by: Michel Marti <mma@objectxp.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  package/tzdata/tzdata.mk | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Applied to master, thanks.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-19 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 10:41 [Buildroot] [PATCH 1/1] tzdata: Reorder zone list to avoid missing links Michel Marti
2016-04-06 22:09 ` Arnout Vandecappelle
2016-04-08  8:23 ` [Buildroot] [PATCH v2 " Michel Marti
2016-04-19 21:16   ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.