[OE-core] how to set time zone

Andrea Adami andrea.adami at gmail.com
Wed Nov 2 17:32:06 UTC 2011


On Mon, Oct 31, 2011 at 1:44 AM, Ni Qingliang <niqingliang at insigma.com.cn>wrote:

> I'd like the 'system level configuration' solution.
>
> the /etc/localtime/ link can be done when packaging rootfs (using the
> system level configuration).
>
> On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote:
> > Setting the default TZ for the image is something that should be done in
> a post
> > install script for the tzdata package or something similar.
> >
> > Since the /etc/localtime is usually a copy/hardlink or symlink to the
> timezone
> > data we don't want to package it up.  Instead we want to perform the
> actions
> > that a program running on the target system itself would use to change
> the timezone.
> >
> > So I think the easiest approach is to add a system level configuration
> variable
> > (set the default).
> >
> > Then use this variable to populate the configuration file that specifies
> the
> > system timezone... and then use the post install process to check the
> contents
> > of a text file.
> >
> > Alternatively do this via an initscript -- but for folks w/ read-only
> > filesystems I'm not sure that will work.
> >
> > --Mark
>
<cut>

Maybe I misunderstand "system level configuration" but in the meta-oe
recipe we have

DEFAULT_TIMEZONE ?= "Europe/London"

Maybe UTC would be better?
Note how the variable is weak thus can be overridden in local.conf.

Secondly, why do it as post-install or at image do_rootfs stage when we
have set the variable and are therefore able to provide sane defaults in
do_install?

Other points before starting to write a patch:
-why is the recipe in oe-core doing   chown -R root:root ${D}   ?

-the logic around   # libc is removing zoneinfo files from package
  Is it only eglibc?


Regards

Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111102/02e431a1/attachment-0002.html>


More information about the Openembedded-core mailing list