All of lore.kernel.org
 help / color / mirror / Atom feed
* Reduce dependency chain when gobject-introspection disabled
       [not found] <175673>
@ 2023-03-24  9:33 ` Petr Kubizňák
  2023-03-24  9:33   ` [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED Petr Kubizňák
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Petr Kubizňák @ 2023-03-24  9:33 UTC (permalink / raw)
  To: openembedded-core

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.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED
  2023-03-24  9:33 ` Reduce dependency chain when gobject-introspection disabled Petr Kubizňák
@ 2023-03-24  9:33   ` Petr Kubizňák
  2023-03-24 10:22     ` Alexander Kanavin
  2023-03-24  9:33   ` [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG Petr Kubizňák
  2023-03-24  9:33   ` [OE-core][PATCH v2 3/3] python3-pygobject: depend on gobject-introspection Petr Kubizňák
  2 siblings, 1 reply; 6+ messages in thread
From: Petr Kubizňák @ 2023-03-24  9:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: Petr Kubizňák

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.

Signed-off-by: Petr Kubizňák <kubiznak@2n.com>
---
 meta/classes-recipe/gobject-introspection.bbclass | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/gobject-introspection.bbclass b/meta/classes-recipe/gobject-introspection.bbclass
index 0c7b7d200a..eb55e7c5e8 100644
--- a/meta/classes-recipe/gobject-introspection.bbclass
+++ b/meta/classes-recipe/gobject-introspection.bbclass
@@ -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
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG
  2023-03-24  9:33 ` Reduce dependency chain when gobject-introspection disabled Petr Kubizňák
  2023-03-24  9:33   ` [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED Petr Kubizňák
@ 2023-03-24  9:33   ` Petr Kubizňák
  2023-03-24 10:29     ` Alexander Kanavin
  2023-03-24  9:33   ` [OE-core][PATCH v2 3/3] python3-pygobject: depend on gobject-introspection Petr Kubizňák
  2 siblings, 1 reply; 6+ messages in thread
From: Petr Kubizňák @ 2023-03-24  9:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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 <kubiznak@2n.com>
---
 meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
index 120ee80b17..5c870147d0 100644
--- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
+++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
@@ -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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [OE-core][PATCH v2 3/3] python3-pygobject: depend on gobject-introspection
  2023-03-24  9:33 ` Reduce dependency chain when gobject-introspection disabled Petr Kubizňák
  2023-03-24  9:33   ` [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED Petr Kubizňák
  2023-03-24  9:33   ` [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG Petr Kubizňák
@ 2023-03-24  9:33   ` Petr Kubizňák
  2 siblings, 0 replies; 6+ messages in thread
From: Petr Kubizňák @ 2023-03-24  9:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: Petr Kubizňák

When g-i feature is disabled, the gobject-introspection package
dependency is not pulled in but pygobject has a hard dependency on it.

Signed-off-by: Petr Kubizňák <kubiznak@2n.com>
---
 meta/recipes-devtools/python/python3-pygobject_3.42.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-pygobject_3.42.2.bb b/meta/recipes-devtools/python/python3-pygobject_3.42.2.bb
index cc7b07e804..f54f4ce784 100644
--- a/meta/recipes-devtools/python/python3-pygobject_3.42.2.bb
+++ b/meta/recipes-devtools/python/python3-pygobject_3.42.2.bb
@@ -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"
 
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED
  2023-03-24  9:33   ` [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED Petr Kubizňák
@ 2023-03-24 10:22     ` Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2023-03-24 10:22 UTC (permalink / raw)
  To: Petr Kubizňák; +Cc: openembedded-core

On Fri, 24 Mar 2023 at 10:36, Petr Kubizňák <kubiznak@2n.com> wrote:
>  # 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"

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG
  2023-03-24  9:33   ` [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG Petr Kubizňák
@ 2023-03-24 10:29     ` Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2023-03-24 10:29 UTC (permalink / raw)
  To: Petr Kubizňák; +Cc: openembedded-core

Shouldn't this be something like
PACKAGECONFIG[gobject-types] =
"-Dgobject_types=true,-Dgobject_types=false,glib-2.0"

?

Alex

On Fri, 24 Mar 2023 at 10:36, Petr Kubizňák <kubiznak@2n.com> wrote:
>
> 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 <kubiznak@2n.com>
> ---
>  meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> index 120ee80b17..5c870147d0 100644
> --- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> +++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> @@ -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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-24 10:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <175673>
2023-03-24  9:33 ` Reduce dependency chain when gobject-introspection disabled Petr Kubizňák
2023-03-24  9:33   ` [OE-core][PATCH v2 1/3] gobject-introspection: check for GI_DATA_ENABLED Petr Kubizňák
2023-03-24 10:22     ` Alexander Kanavin
2023-03-24  9:33   ` [OE-core][PATCH v2 2/3] graphene: add glib PACKAGECONFIG Petr Kubizňák
2023-03-24 10:29     ` Alexander Kanavin
2023-03-24  9:33   ` [OE-core][PATCH v2 3/3] python3-pygobject: depend on gobject-introspection Petr Kubizňák

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.