[OE-core] [oe-commits] [openembedded-core] 02/09: glib-2.0: add missing locale dependencies to PN-ptest

Martin Jansa martin.jansa at gmail.com
Sat Oct 13 21:16:17 UTC 2018


I was checking my builds and here is what I've found.

The dependency on virtual/libc-locale is correctly shown in bitbake -e
glib-2.0.

The glibc-locale is selected as provider for these as expected:

bitbake -v -v -v glib-2.0
...
NOTE: selecting glibc-locale to satisfy virtual/libc-locale due to
PREFERRED_PROVIDERS
NOTE: selecting glibc to satisfy virtual/libc due to PREFERRED_PROVIDERS
NOTE: selecting pkgconfig-native to satisfy pkgconfig-native due to
PREFERRED_PROVIDERS
NOTE: selecting glibc-locale to satisfy runtime locale-base-es-es due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-fa-ir due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-de-de due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-iso8859-15 due
to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime
glibc-localedata-translit-cjk-variants due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-cp1255 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-invariant due
to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-utf-8 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-32 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-16 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-en-gb due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-charmap-cp1255 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-ru-ru due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-tr-tr due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-lt-lt due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-ja-jp.euc-jp
due to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-hr-hr due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-fr-fr due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-utf-7 due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-euc-jp due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime glibc-gconv-iso8859-1 due
to PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale
NOTE: selecting glibc-locale to satisfy runtime locale-base-el-gr due to
PREFERRED_PROVIDER_virtual/libc-locale = glibc-locale

But then insane.bbclass doesn't find rdep_data with "rdep_data =
oe.packagedata.read_subpkgdata(rdepend, d)", because there is locale-base-*
only for en-us in our build:

$ ls pkgdata/qemux86/runtime/locale-base-*
pkgdata/qemux86/runtime/locale-base-en-us
pkgdata/qemux86/runtime/locale-base-en-us.packaged

Which leads to:
GLIBC_GENERATE_LOCALES="en_US.UTF-8"
set in our builds.

I'm sorry for noise, I wish it would be more obvious, especially because
there was still one more mystery with bash recipe which has:
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-fr-fr
locale-base-de-de"
and doesn't trigger the QA errors in our builds, and I've discovered that
I've found about this long time ago and added work around in out bash
bbappend:

# We need to revert changes from
#
http://git.openembedded.org/openembedded-core/commit/?h=rocko&id=70e544452b6825686f06484d994936ded677825f
# because as described in:
#
http://lists.openembedded.org/pipermail/openembedded-commits/2017-November/215520.html
# it doesn't work when GLIBC_GENERATE_LOCALES are restricted like they are
in our builds:
#
meta-distro1/conf/distro/include/distro1-toolchain.inc:GLIBC_GENERATE_LOCALES
= "en_US.UTF-8"
#
meta-distro2/conf/distro/include/distro2-toolchain.inc:GLIBC_GENERATE_LOCALES
= "en_US.UTF-8"
RDEPENDS_${PN}-ptest_remove_libc-glibc = "locale-base-fr-fr
locale-base-de-de"

So clearly a year is too long for my memory to remember tweaks like this
especially when bitbake -e doesn't show them (more about that bellow).

Maybe we should improve the comment in meta/conf/local.conf.sample.extended
to explain possible issues with ptest when GLIBC_GENERATE_LOCALES doesn't
include certain locales? Now there is only this paragraph:

# Set GLIBC_GENERATE_LOCALES to the locales you wish to generate should you
not
# wish to perform the time-consuming step of generating all LIBC locales.
# NOTE: If removing en_US.UTF-8 you will also need to uncomment, and set
# appropriate value for IMAGE_LINGUAS.
# WARNING: this may break localisation!
#GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
#IMAGE_LINGUAS ?= "en-gb"

I'll send patch for that.

There is locale-base-fr-fr listed twice in glib.inc, I'll send patch for
that as well.

I wonder why locale-base isn't shown at all in bitbake -e bash with my
bbappend removing the dependency:

# $RDEPENDS_bash-ptest [3 operations]
#   rename from RDEPENDS_${PN}-ptest data.py:116 [expandKeys]
#     "make"
#   override[class-native]:rename from RDEPENDS_${PN}-ptest_class-native
data_smart.py:641 [renameVar]
#     ""
#   override[class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
#     ""
# pre-expansion value:
#   "make"
RDEPENDS_bash-ptest="make"

There isn't any history about RDEPENDS_${PN}-ptest before the rename.

$ grep RDEPENDS.*ptest env.bash
#   override[bash-ptest]:rename from RDEPENDS_${PN}-ptest data.py:116
[expandKeys]
#   override[bash-ptest_class-native]:rename from
RDEPENDS_${PN}-ptest_class-native data_smart.py:641 [renameVar]
#   override[bash-ptest_class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
# $RDEPENDS_bash-ptest [3 operations]
#   rename from RDEPENDS_${PN}-ptest data.py:116 [expandKeys]
#   override[class-native]:rename from RDEPENDS_${PN}-ptest_class-native
data_smart.py:641 [renameVar]
#   override[class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
RDEPENDS_bash-ptest="make"
# $RDEPENDS_bash-ptest_class-native
#   rename from RDEPENDS_${PN}-ptest_class-native data_smart.py:641
[renameVar]
RDEPENDS_bash-ptest_class-native=""
# $RDEPENDS_bash-ptest_class-nativesdk
#   rename from RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641
[renameVar]
RDEPENDS_bash-ptest_class-nativesdk=""

$ grep locale-base env.bash
$

And in the build without the bbappend:

# $RDEPENDS_bash-ptest [3 operations]
#   rename from RDEPENDS_${PN}-ptest data.py:116 [expandKeys]
#     " make"
#   override[class-native]:rename from RDEPENDS_${PN}-ptest_class-native
data_smart.py:641 [renameVar]
#     ""
#   override[class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
#     ""
# pre-expansion value:
#   " make locale-base-fr-fr locale-base-de-de"
RDEPENDS_bash-ptest=" make locale-base-fr-fr locale-base-de-de"

but also without the RDEPENDS_${PN}-ptest history:

$ grep RDEPENDS.*ptest env.bash
#   override[bash-ptest]:rename from RDEPENDS_${PN}-ptest data.py:116
[expandKeys]
#   override[bash-ptest_class-native]:rename from
RDEPENDS_${PN}-ptest_class-native data_smart.py:641 [renameVar]
#   override[bash-ptest_class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
# $RDEPENDS_bash-ptest [3 operations]
#   rename from RDEPENDS_${PN}-ptest data.py:116 [expandKeys]
#   override[class-native]:rename from RDEPENDS_${PN}-ptest_class-native
data_smart.py:641 [renameVar]
#   override[class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
RDEPENDS_bash-ptest=" make locale-base-fr-fr locale-base-de-de"
# $RDEPENDS_bash-ptest_class-native
#   rename from RDEPENDS_${PN}-ptest_class-native data_smart.py:641
[renameVar]
RDEPENDS_bash-ptest_class-native=""
# $RDEPENDS_bash-ptest_class-nativesdk
#   rename from RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641
[renameVar]
RDEPENDS_bash-ptest_class-nativesdk=""

$ grep locale-base env.bash
#   " make locale-base-fr-fr locale-base-de-de"
RDEPENDS_bash-ptest=" make locale-base-fr-fr locale-base-de-de"

The same with glib-2.0:
# $RDEPENDS_glib-2.0-ptest [3 operations]
#   rename from RDEPENDS_${PN}-ptest data.py:116 [expandKeys]
#     " gnome-desktop-testing             dbus
 gnome-desktop-testing             tzdata             tzdata-americas
       tzdata-asia             tzdata-europe             tzdata-posix
       shared-mime-info            "
#   override[class-native]:rename from RDEPENDS_${PN}-ptest_class-native
data_smart.py:641 [renameVar]
#     ""
#   override[class-nativesdk]:rename from
RDEPENDS_${PN}-ptest_class-nativesdk data_smart.py:641 [renameVar]
#     ""
# pre-expansion value:
#   " gnome-desktop-testing             dbus
 gnome-desktop-testing             tzdata             tzdata-americas
       tzdata-asia             tzdata-europe             tzdata-posix
       shared-mime-info                        glibc-gconv-utf-16
   glibc-charmap-utf-8             glibc-gconv-cp1255
 glibc-charmap-cp1255             glibc-gconv-utf-32
 glibc-gconv-utf-7             glibc-gconv-euc-jp
 glibc-gconv-iso8859-1             glibc-gconv-iso8859-15
 glibc-charmap-invariant
 glibc-localedata-translit-cjk-variants             locale-base-tr-tr
       locale-base-lt-lt             locale-base-ja-jp.euc-jp
 locale-base-fa-ir             locale-base-ru-ru
 locale-base-de-de             locale-base-hr-hr
 locale-base-el-gr             locale-base-fr-fr
 locale-base-fr-fr             locale-base-es-es
 locale-base-en-gb            "
RDEPENDS_glib-2.0-ptest=" gnome-desktop-testing             dbus
 gnome-desktop-testing             tzdata             tzdata-americas
       tzdata-asia             tzdata-europe             tzdata-posix
       shared-mime-info                        glibc-gconv-utf-16
   glibc-charmap-utf-8             glibc-gconv-cp1255
 glibc-charmap-cp1255             glibc-gconv-utf-32
 glibc-gconv-utf-7             glibc-gconv-euc-jp
 glibc-gconv-iso8859-1             glibc-gconv-iso8859-15
 glibc-charmap-invariant
 glibc-localedata-translit-cjk-variants             locale-base-tr-tr
       locale-base-lt-lt             locale-base-ja-jp.euc-jp
 locale-base-fa-ir             locale-base-ru-ru
 locale-base-de-de             locale-base-hr-hr
 locale-base-el-gr             locale-base-fr-fr
 locale-base-fr-fr             locale-base-es-es
 locale-base-en-gb            "

It just magically appears in pre-expansion value.

Shouldn't bitbake -e show that "locale-base-fr-fr locale-base-de-de" were
appended (and in the build with bbappend that they were appended and then
removed)? That would help me to find out what's going on much faster.

Cheers,





On Sat, Oct 13, 2018 at 12:29 PM Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> On Sat, 2018-10-13 at 02:15 +0200, Martin Jansa wrote:
> > Hi,
> >
> > sorry for delay, I was first testing a bit more specific fix:
> > DEPENDS_append_libc-glibc = "${@bb.utils.contains('PTEST_ENABLED',
> > '1', '', ' virtual/libc-locale', d)}"
> >
> > but unfortunately this nor your shorter version work.
> >
> > and it's reproducible without the multilib enabled as well:
> >
> > ERROR: glib-2.0-1_2.58.0-r0 do_package_qa: QA Issue: glib-2.0-ptest
> rdepends on locale-base-de-de, but it isn't a build dependency? [build-deps]
> > ERROR: glib-2.0-1_2.58.0-r0 do_package_qa: QA Issue: glib-2.0-ptest
> rdepends on locale-base-el-gr, but it isn't a build dependency? [build-deps]
> > ERROR: glib-2.0-1_2.58.0-r0 do_package_qa: QA Issue: glib-2.0-ptest
> rdepends on locale-base-en-gb, but it isn't a build dependency? [build-deps]
>
> What is also puzzling me is that we're not seeing this in OE-Core on
> the autobuilders. We recently merged much better warning summary code
> so we should see this quite clearly in its output and we're not...
>
> I'm not sure what that means but it suggests there is something going
> on here we're not quite seeing...
>
> Cheers,
>
> Richard
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181013/38e42742/attachment-0002.html>


More information about the Openembedded-core mailing list