On 02/02/2023 11:53, Richard Purdie wrote:
On Thu, 2023-02-02 at 11:41 +0100, Louis Rannou wrote:
On 01/02/2023 18:57, Richard Purdie wrote:
On Wed, 2023-02-01 at 16:02 +0100, Louis Rannou wrote:


I was able to take a quick look at this. The locale generation on
target is broken, it throws errors upon boot. I was able to make it
work with this patch:

diff --git a/meta/recipes-core/glibc/glibc-locale.inc 
b/meta/recipes-core/glibc/glibc-locale.inc
index 7f70b3ca4f..c39007b573 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -60,7 +60,7 @@ DESCRIPTION:localedef = "glibc: compile locale definition 
files"
   # FILES:glibc-gconv will not be automatically extended in multilib.
   # Explicitly add ${MLPREFIX} for FILES:glibc-gconv.
   FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
-FILES:localedef = "${bindir}/localedef"
+FILES:localedef = "${bindir}/localedef ${libdir}/locale"
LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" @@ -87,6 +87,7 @@ do_install() {
          find ${D}${libdir} -type d -empty -delete
          copy_locale_files ${datadir}/locale 0644
          install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED
+       install -d ${D}${libdir}/locale
   }
inherit libc-package

could you see if the same test will now work with that patch applied?
I'm happy to have the basic test but if we can fix this and stop it
regressing that would be even better.

The patch does not change the result. I have actually nothing in the
image/usr/lib/locale directory.

Testing locally, if I don't have the patch and "runqemu core-image-
minimal snapshot kvm", I see errors about locale generation failing
during first boot as the directory isn't present.

If I add the patch and then boot the image, I see the locale generation
happening at first boot. If I then run the locale commands, I can see
the locales present.

I wonder which package do that, because this is not something I see on my qemu. I run a kirkstone qemuarm on poky. Perhaps I need something more recent.


I am not sure to understand... If I add to my image the packages
glibc-localedata-fr-fr and glibc-charmap-utf-8, then I have something in
/usr/share/i18n/locales and /usr/share/i18n/charmaps, and then I can
generate the locales with `localedef -c -i fr_FR -f UTF-8 fr_FR`

In the end, I believe this is correct that I have nothing in
{libdir}/locale, but perhaps the settings IMAGE_LINGUAS (or
GLIBC_GENERATE_LOCALES ?) should specify a rdepend to the locale/charmap
packages, so the locales would exist in the image, but would not be
generated at build.

The locale generation can happen at build time or it can happen at
first boot on the final target. For the second test case, the locales
will only appear during the boot process.

I've merged your patch with the first test case, thanks! I did tweak
the comment message to match that it is just one test so far. Thanks
for getting us that far, it is great to be adding tests around this.

Thank you ! It's cool if I can help more on this. As soon as I can reproduce what you have.

Regards
Louis
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176698): 
https://lists.openembedded.org/g/openembedded-core/message/176698
Mute This Topic: https://lists.openembedded.org/mt/96567951/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to