[Buildroot] [PATCH] system/timezone: check localtime exists

Peter Korsgaard jacmet at uclibc.org
Thu May 22 21:52:29 UTC 2014


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:

 > From: "Yann E. MORIN" <yann.morin.1998 at free.fr>
 > When installing a localtime, check it is a valid timezone.

 > Reported-by: Sagaert Johan <sagaert.johan at skynet.be>
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
 > ---
 >  package/tz/tz.mk         | 5 +++++
 >  package/tzdata/tzdata.mk | 5 +++++
 >  2 files changed, 10 insertions(+)

 > diff --git a/package/tz/tz.mk b/package/tz/tz.mk
 > index 865ba3b..3198db7 100644
 > --- a/package/tz/tz.mk
 > +++ b/package/tz/tz.mk
 > @@ -27,6 +27,11 @@ define TZ_INSTALL_TARGET_CMDS
 >  	mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
 >  	cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
 >  	if [ -n "$(TZ_LOCALTIME)" ]; then                               \
 > +	    if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) ]; then \
 > +	        printf "'%s' is not a valid timezone\n"                 \
 > +	               "$(TZDATA_LOCALTIME)";                           \

I have extended this to make it a bit more clear what the user should
change:

-               printf "'%s' is not a valid timezone\n"                 \
+               printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \

And committed, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list