diff mbox series

[6/7] python3-pygobject: mandate gobject-introspection-data DISTRO_FEATURE

Message ID 20230516184031.2255171-6-ross.burton@arm.com
State Accepted, archived
Commit 723949d491991ec6e555f30d4b06a59fecbc1f35
Headers show
Series [1/7] meta: depend on autoconf-archive-native, not autoconf-archive | expand

Commit Message

Ross Burton May 16, 2023, 6:40 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

PyGObject needs gobject-introspection to function, so add a distro
features check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/python/python3-pygobject_3.44.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Petr Kubizňák - 2N May 18, 2023, 10:49 a.m. UTC | #1
With gobject-introspection in DEPENDS, PyGObject builds always, even if gobject-introspection-data is not in DISTRO_FEATURES. Is this conditional approach better?

Petr
Ross Burton May 22, 2023, 4:11 p.m. UTC | #2
On 18 May 2023, at 11:49, Petr Kubizňák - 2N <kubiznak@2n.com> wrote:
> 
> With gobject-introspection in DEPENDS, PyGObject builds always, even if gobject-introspection-data is not in DISTRO_FEATURES. Is this conditional approach better?

Builds is not the same as is useful.

PyGObject uses G-I to interface to GObject itself.

Without qemu-usermode, gobject-introspection is a stub, as can be shown by comparing gobject-introspection with and without qemu-usermode:

Changes to packages/cortexa57-poky-linux/gobject-introspection (sysroot):
  /usr/lib/girepository-1.0 was removed
  /usr/lib/girepository-1.0/Gio-2.0.typelib was removed
  /usr/lib/girepository-1.0/GIRepository-2.0.typelib was removed
…

The target gobject-introspection recipe should also refuse to build unless GI is enabled.

Ross
Martin Jansa May 24, 2023, 12:10 p.m. UTC | #3
Ross, are you going to add REQUIRED_DISTRO_FEATURES =
"gobject-introspection-data" to these as well?

ERROR: Nothing PROVIDES 'python3-pygobject' (but
meta-oe/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
DEPENDS on or otherwise requires it)
python3-pygobject was skipped: missing required distro feature
'gobject-introspection-data' (not in DISTRO_FEATURES)

ERROR: Nothing RPROVIDES 'python3-pygobject' (but
meta-oe/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/
firewalld_1.2.0.bb,
meta-oe/meta-networking/recipes-daemons/networkd-dispatcher/
networkd-dispatcher_2.1.bb, oe-core/meta/recipes-devtools/python/
python3-dbusmock_0.28.7.bb, meta-oe/meta-python/recipes-devtools/python/
python3-pydbus_0.6.0.bb,
meta-oe/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb,
meta-oe/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb
RDEPENDS on or otherwise requires it)
python3-pygobject was skipped: missing required distro feature
'gobject-introspection-data' (not in DISTRO_FEATURES)

There are probably few more, e.g. python3-pydbus-manager which rdepends on
python3-pydbus.

Regards,

On Mon, May 22, 2023 at 6:11 PM Ross Burton <ross.burton@arm.com> wrote:

> On 18 May 2023, at 11:49, Petr Kubizňák - 2N <kubiznak@2n.com> wrote:
> >
> > With gobject-introspection in DEPENDS, PyGObject builds always, even if
> gobject-introspection-data is not in DISTRO_FEATURES. Is this conditional
> approach better?
>
> Builds is not the same as is useful.
>
> PyGObject uses G-I to interface to GObject itself.
>
> Without qemu-usermode, gobject-introspection is a stub, as can be shown by
> comparing gobject-introspection with and without qemu-usermode:
>
> Changes to packages/cortexa57-poky-linux/gobject-introspection (sysroot):
>   /usr/lib/girepository-1.0 was removed
>   /usr/lib/girepository-1.0/Gio-2.0.typelib was removed
>   /usr/lib/girepository-1.0/GIRepository-2.0.typelib was removed
> …
>
> The target gobject-introspection recipe should also refuse to build unless
> GI is enabled.
>
> Ross
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181598):
> https://lists.openembedded.org/g/openembedded-core/message/181598
> Mute This Topic: https://lists.openembedded.org/mt/98932959/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Ross Burton May 24, 2023, 5:15 p.m. UTC | #4
On 24 May 2023, at 13:10, Martin Jansa <martin.jansa@gmail.com> wrote:
> 
> Ross, are you going to add REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" to these as well?
> 
> ERROR: Nothing PROVIDES 'python3-pygobject' (but meta-oe/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb DEPENDS on or otherwise requires it)
> python3-pygobject was skipped: missing required distro feature 'gobject-introspection-data' (not in DISTRO_FEATURES)
> 
> ERROR: Nothing RPROVIDES 'python3-pygobject' (but meta-oe/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.2.0.bb, meta-oe/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.1.bb, oe-core/meta/recipes-devtools/python/python3-dbusmock_0.28.7.bb, meta-oe/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb, meta-oe/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb, meta-oe/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb RDEPENDS on or otherwise requires it)
> python3-pygobject was skipped: missing required distro feature 'gobject-introspection-data' (not in DISTRO_FEATURES)
> 
> There are probably few more, e.g. python3-pydbus-manager which rdepends on python3-pydbus.

The pydbus recipes are incredibly obsolete so I took the executive decision to propose removing those, but fixed the others.

Ross
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb b/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
index 1132e9a9ed3..43125927cd3 100644
--- a/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
+++ b/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
@@ -8,7 +8,9 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 GNOMEBASEBUILDCLASS = "meson"
 GIR_MESON_OPTION = ""
 
-inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even
+inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even features_check
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
 DEPENDS += "python3 glib-2.0"