Reduce dependency chain when gobject-introspection disabled
I have extended the patch reducing the dependency chain when g-i is disabled. It was possible to also condition the dependency on gobject-introspection-native. I did not manage to condition the dependency on qemu-native, as that leads to too many failures that I did not manage to resolve. Anyway, I believe that removing a part of dependencies is better than nothing. The main goal of this patch is to remove undesired packages from the target image, which is accomplished. I don't think qemu-native affects the image at all.
PATCH v2 1/3 gobject-introspection: check for GI_DATA_ENABLED
When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection and gobject-introspection-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled.
--- meta/classes-recipe/gobject-introspection.bbclass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
meta/classes-recipe/gobject-introspection.bbclass +8 -5
@@ -35,7 +35,8 @@ EXTRA_OEMESON:prepend:class-nativesdk = "${@['', '${GIRMESONBUILD}'][d.getVar('G # Generating introspection data depends on a combination of native and target # introspection tools, and qemu to run the target tools. -DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native" +DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection gobject-introspection-native', '', d)}" +DEPENDS:append:class-target = " qemu-native" # Even though introspection is disabled on -native, gobject-introspection package is still # needed for m4 macros.
@@ -46,10 +47,12 @@ DEPENDS:append:class-nativesdk = " gobject-introspection-native" export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}" do_configure:prepend:class-target () { - # introspection.m4 pre-packaged with upstream tarballs does not yet - # have our fixes - mkdir -p ${S}/m4 - cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 + if [ "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '1', '0', d)}" = "1" ] ; then + # introspection.m4 pre-packaged with upstream tarballs does not yet + # have our fixes + mkdir -p ${S}/m4 + cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 + fi } # .typelib files are needed at runtime and so they go to the main package (so
Signature · 1 line
2.30.2
Re: [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED
meta/classes-recipe/gobject-introspection.bbclass EXTRA_OEMESON:prepend:class-nativesdk = "${@['', '${GIRMESONBUILD}'][d.getVar('G · line 39
Quoted 5 lines · Petr Kubizňák
# Generating introspection data depends on a combination of native and target
# introspection tools, and qemu to run the target tools.meta/classes-recipe/gobject-introspection.bbclass +2
-1-DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native" +DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection gobject-introspection-native', '', d)}" +DEPENDS:append:class-target = " qemu-native"
This does not seem right; if g-i is entirely disabled, then qemu shouldn't be called at any point, and so should be in the same conditional list.
Alex
PATCH v2 2/3 graphene: add glib PACKAGECONFIG
In reply to Petr KubizňákWhen gobject-introspection is enabled, glib dependency is pulled in automatically. When it is disabled, glib dependency should be optional via PACKAGECONFIG.
Default is to enable glib so that graphene-gobject is built (dependency of gtk4).
--- meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/graphene/graphene_1.10.8.bb +2 -1
@@ -11,8 +11,9 @@ SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da3 # Disable neon support by default on ARM-32 platforms because of the # following upstream bug: https://github.com/ebassi/graphene/issues/215 -PACKAGECONFIG ?= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}" +PACKAGECONFIG ?= "glib ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}" +PACKAGECONFIG[glib] = ",,glib-2.0" PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false," GIR_MESON_ENABLE_FLAG = 'enabled'
Signature · 1 line
2.30.2
Re: [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG
Shouldn't this be something like PACKAGECONFIG[gobject-types] = "-Dgobject_types=true,-Dgobject_types=false,glib-2.0"
?
Alex
Quoted 40 lines · Petr Kubizňák
When gobject-introspection is enabled, glib dependency is pulled in automatically. When it is disabled, glib dependency should be optional via PACKAGECONFIG.
Default is to enable glib so that graphene-gobject is built (dependency of gtk4).
Signed-off-by Petr Kubizňák <[email protected]>--- meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-graphics/graphene/graphene_1.10.8.bb +2
-2@@ -11,8 +11,9 @@ SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da3 # Disable neon support by default on ARM-32 platforms because of the # following upstream bug: https://github.com/ebassi/graphene/issues/215 -PACKAGECONFIG ?= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}" +PACKAGECONFIG ?= "glib ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}" +PACKAGECONFIG[glib] = ",,glib-2.0" PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false," GIR_MESON_ENABLE_FLAG = 'enabled' --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179024): https://lists.openembedded.org/g/openembedded-core/message/179024
Mute This Topic: https://lists.openembedded.org/mt/97820022/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 3/3 python3-pygobject: depend on gobject-introspection
In reply to Petr KubizňákWhen g-i feature is disabled, the gobject-introspection package dependency is not pulled in but pygobject has a hard dependency on it.
--- meta/recipes-devtools/python/python3-pygobject_3.42.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-pygobject_3.42.2.bb +1 -1
@@ -10,7 +10,7 @@ GIR_MESON_OPTION = "" inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even -DEPENDS += "python3 glib-2.0" +DEPENDS += "python3 glib-2.0 gobject-introspection" SRCNAME="pygobject"
Signature · 1 line
2.30.2