[Buildroot] [PATCH 2/6] system: add selection of a default localtime

Peter Korsgaard peter at korsgaard.com
Tue Apr 8 21:50:51 UTC 2014


>>>>> "Peter" == Peter Korsgaard <jacmet at uclibc.org> writes:

 >> --- a/package/tzdata/tzdata.mk
 >> +++ b/package/tzdata/tzdata.mk
 >> @@ -39,8 +39,13 @@ define TZDATA_INSTALL_TARGET_CMDS
 >> cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
 >> cd $(TARGET_DIR)/usr/share/zoneinfo;    \
 >> for zone in posix/*; do                 \
 >> -	    ln -sfn "$${zone}" "$${zone##*/}";    \
 >> +	    ln -sfn "$${zone}" "$${zone##*/}";  \
 >> done
 >> +	if [ -n "$(BR2_TARGET_LOCALTIME)" ]; then                           \
 >> +	    cd $(TARGET_DIR)/etc;                                           \
 >> +	    ln -sf ../usr/share/zoneinfo/$(BR2_TARGET_LOCALTIME) localtime; \
 >> +	    echo "$(BR2_TARGET_LOCALTIME)" >timezone;                       \

 > BR2_TARGET_LOCALTIME is a string kconfig, so it already has quotes
 > around it, and the extra quotes will cancel eachother out.

 > We should imho use qstrip and assign it to a TZDATA_LOCALTIME variable
 > and use that similar to how it is done for TZDATA_ZONELIST.

 > Committed with that fixed, thanks.

 > This also doesn't give very clear error messages if the user misspelled
 > the localtime. Perhaps we should error out with something more sensible?

Hmm, and it doesn't actually work if you use something like
Europe/Copenhagen as those are under /usr/share/zoneinfo/posix :/

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list