Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/6] system: add selection of a default localtime
Date: Tue, 08 Apr 2014 23:47:29 +0200	[thread overview]
Message-ID: <87txa3a3ym.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <a4e40e88137b1d959e165e9720fcbef7286b2b06.1396900553.git.yann.morin.1998@free.fr> (Yann E. MORIN's message of "Mon, 7 Apr 2014 21:58:04 +0200")

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

 > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > [alexandre.belloni: move from "tzdata" to "system configuration"]
 > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
 > [yann.morin.1998 at free.fr: move into the BR2_TARGET_TZ_INFO conditionnal block]
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > ---
 >  package/tzdata/tzdata.mk |  7 ++++++-
 >  system/Config.in         | 14 ++++++++++++++
 >  2 files changed, 20 insertions(+), 1 deletion(-)

 > diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
 > index 5900473..762a31e 100644
 > --- 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?

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2014-04-08 21:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 19:58 [Buildroot] [PATCH 0/6 v4] Setting timezone for uClibc, and setting localtime (branch yem/tz) Yann E. MORIN
2014-04-07 19:58 ` [Buildroot] [PATCH 1/6] system: make the zoneinfo list a system option Yann E. MORIN
2014-04-08 21:35   ` Peter Korsgaard
2014-04-07 19:58 ` [Buildroot] [PATCH 2/6] system: add selection of a default localtime Yann E. MORIN
2014-04-08 21:47   ` Peter Korsgaard [this message]
2014-04-08 21:50     ` Peter Korsgaard
2014-04-08 21:57       ` Peter Korsgaard
2014-04-07 19:58 ` [Buildroot] [PATCH 3/6] tzdata: allow host build Yann E. MORIN
2014-04-08 22:04   ` Peter Korsgaard
2014-04-07 19:58 ` [Buildroot] [PATCH 4/6] tzdump: new host package Yann E. MORIN
2014-04-08 22:13   ` Peter Korsgaard
2014-04-08 22:18     ` Yann E. MORIN
2014-04-08 22:25       ` Peter Korsgaard
2014-04-07 19:58 ` [Buildroot] [PATCH 5/6] tz: new package Yann E. MORIN
2014-04-08 22:32   ` Peter Korsgaard
2014-04-07 19:58 ` [Buildroot] [PATCH 6/6] system: allow setting the local timezone for uClibc Yann E. MORIN
2014-04-08 22:39   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txa3a3ym.fsf@dell.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox