Skip to contentSkip to conversation

gobject-introspection: reduce dependencies

PATCH Superseded Petr Kubizňák 2 participants 17 messages Mar 31, 2023 – Apr 5, 2023

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/10 gobject-introspection: reduce dependencies

When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled.

---
 meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes-recipe/gobject-introspection.bbclass +7 -5
index 0c7b7d200a..98edb93761 100644
@@ -35,7 +35,7 @@ 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 qemu-native', '', d)}"
 
 # Even though introspection is disabled on -native, gobject-introspection package is still
 # needed for m4 macros.
@@ -46,10 +46,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
#1 lore raw

PATCH v4 2/10 graphene: add gobject-types PACKAGECONFIG

Add an option to enable/disable build of graphene-gobject. When enabled, add glib dependency (not pulled in implicitly if the gobject-introspection feature is disabled).

Default is to enable gobject-types 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
index 120ee80b17..9f5b4d0e2d 100644
@@ -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 ?= "gobject-types ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
 
+PACKAGECONFIG[gobject-types] = "-Dgobject_types=true,-Dgobject_types=false,glib-2.0"
 PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
 
 GIR_MESON_ENABLE_FLAG = 'enabled'
Signature · 1 line
2.30.2
#2 lore raw

PATCH v4 3/10 python3-pygobject: depend on gobject-introspection

In reply to 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.

---
 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
index cc7b07e804..f54f4ce784 100644
@@ -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
#3 lore raw

PATCH v4 4/10 gconf: add missing dependencies

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native and gobject-introspection package dependencies are not pulled in but gconf has a hard dependency on them (do_configure fails due to missing introspection.m4 file and glib-gettextize).

---
 meta/recipes-gnome/gnome/gconf_3.2.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gnome/gconf_3.2.6.bb +1 -1
index 776f6091aa..e712e4729c 100644
@@ -7,7 +7,7 @@ HOMEPAGE = "https://gitlab.gnome.org/Archive/gconf"
 LICENSE = "LGPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
-DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native"
+DEPENDS = "glib-2.0 glib-2.0-native gobject-introspection dbus dbus-glib libxml2 intltool-native"
 
 inherit gnomebase gtk-doc gettext gobject-introspection gio-module-cache
 
Signature · 1 line
2.30.2
#4 lore raw

PATCH v4 5/10 avahi: add missing dependencies

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native and gobject-introspection package dependencies are not pulled in but avahi has a hard dependency on them (do_configure fails due to missing introspection.m4 file, do_compile fails due to missing glib-mkenums).

---
 meta/recipes-connectivity/avahi/avahi_0.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/avahi/avahi_0.8.bb +1 -1
index a830385352..bf6835e0d6 100644
@@ -35,7 +35,7 @@ SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de79
 # Issue only affects Debian/SUSE, not us
 CVE_CHECK_IGNORE += "CVE-2021-26720"
 
-DEPENDS = "expat libcap libdaemon glib-2.0"
+DEPENDS = "expat libcap libdaemon glib-2.0 glib-2.0-native gobject-introspection"
 
 # For gtk related PACKAGECONFIGs: gtk, gtk3
 AVAHI_GTK ?= ""
Signature · 1 line
2.30.2
#5 lore raw

PATCH v4 6/10 webkitgtk: add missing dependencies

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, gettext and glib-2.0-native dependencies are not pulled in, which causes failures in do_compile due to missing xgettext and gdbus-codegen.

---
 meta/recipes-sato/webkit/webkitgtk_2.38.5.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/webkit/webkitgtk_2.38.5.bb +2 -1
index e52920883a..b49ecf2a31 100644
@@ -17,7 +17,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            "
 SRC_URI[sha256sum] = "40c20c43022274df5893f22b1054fa894c3eea057389bb08aee08c5b0bb0c1a7"
 
-inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen
+inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen gettext
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}"
@@ -38,6 +38,7 @@ DEPENDS += " \
           libnotify \
           gstreamer1.0 \
           gstreamer1.0-plugins-base \
+          glib-2.0-native \
           "
 
 PACKAGECONFIG_SOUP ?= "soup3"
Signature · 1 line
2.30.2
#6 lore raw

Re: [OE-core][PATCH v4 06/10] webkitgtk: add missing dependencies

Quoted 23 lines · Petr Kubizňák

When gobject-introspection feature is disabled, gettext and glib-2.0-native dependencies are not pulled in, which causes failures in do_compile due to missing xgettext and gdbus-codegen.

---
 meta/recipes-sato/webkit/webkitgtk_2.38.5.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/webkit/webkitgtk_2.38.5.bb +1 -1
index e52920883a..b49ecf2a31 100644
@@ -17,7 +17,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            "
 SRC_URI[sha256sum] = "40c20c43022274df5893f22b1054fa894c3eea057389bb08aee08c5b0bb0c1a7"
 
-inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen
+inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen gettext
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}"

meta/recipes-sato/webkit/webkitgtk_2.38.5.bb DEPENDS += " \ · line 44

Quoted 7 lines
meta/recipes-sato/webkit/webkitgtk_2.38.5.bb +1 -0
@@ -38,6 +38,7 @@ DEPENDS += " \
           libnotify \
           gstreamer1.0 \
           gstreamer1.0-plugins-base \
+          glib-2.0-native \
           "
 
 PACKAGECONFIG_SOUP ?= "soup3"

If the dependency is just xgettext then it may just be a DEPENDS += "gettext-native" which is a lower requirement than the full gettext target code?

Cheers,

Richard

#7 lore raw

Re: [OE-core][PATCH v4 06/10] webkitgtk: add missing dependencies

Hi Richard,

Yes, that is sufficient. I've prepared an updated patch. In the meantime, I've noticed some of the patches from the series had been merged into master-next, but not to the master yet. Should I now resend the whole series, or filter out these patches, i.e. rebase to master or master-next?

Thanks,
Petr

________________________________________
From: Richard Purdie <[email protected]>
Sent: Friday, March 31, 2023 2:06 PM
To: Petr Kubizňák - 2N; [email protected]
Subject: Re: [OE-core][PATCH v4 06/10] webkitgtk: add missing dependencies

Quoted 23 lines · Petr Kubizňák

When gobject-introspection feature is disabled, gettext and glib-2.0-native dependencies are not pulled in, which causes failures in do_compile due to missing xgettext and gdbus-codegen.

---
 meta/recipes-sato/webkit/webkitgtk_2.38.5.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-sato/webkit/webkitgtk_2.38.5.bb +1 -1
index e52920883a..b49ecf2a31 100644
@@ -17,7 +17,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            "
 SRC_URI[sha256sum] = "40c20c43022274df5893f22b1054fa894c3eea057389bb08aee08c5b0bb0c1a7"
 
-inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen
+inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen gettext
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}"

meta/recipes-sato/webkit/webkitgtk_2.38.5.bb DEPENDS += " \ · line 44

Quoted 7 lines
meta/recipes-sato/webkit/webkitgtk_2.38.5.bb +1 -0
@@ -38,6 +38,7 @@ DEPENDS += " \
           libnotify \
           gstreamer1.0 \
           gstreamer1.0-plugins-base \
+          glib-2.0-native \
           "
 
 PACKAGECONFIG_SOUP ?= "soup3"

If the dependency is just xgettext then it may just be a DEPENDS += "gettext-native" which is a lower requirement than the full gettext target code?

Cheers,

Richard

#8 lore raw

Re: [OE-core][PATCH v4 06/10] webkitgtk: add missing dependencies

Quoted 7 lines · On Mon, 2023-04-03 at 10:31 +0000, Petr Kubizňák - 2N wrote:

Hi Richard,

Yes, that is sufficient. I've prepared an updated patch. In the meantime, I've noticed some of the patches from the series had been merged into master-next, but not to the master yet. Should I now resend the whole series, or filter out these patches, i.e. rebase to master or master-next?

Normally I'd suggest rebasing on master unless there is another series this series depends upon. The ones in master-next were the ones I thought were simpler/ready and had been through testing in that branch.

I've just gone ahead and merged them so you should find they drop out naturally now.

I sometimes do this just to reduce the need to resend patches, for me to re-read/re-test them and make it clearer where the review is still needed.

Cheers,

Richard

#9 lore raw

PATCH v4 7/10 harfbuzz: depend on glib-2.0-native

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native package dependency is not pulled in but harfbuzz has a hard dependency on it (do_configure fails due to missing glib-mkenums).

---
 meta/recipes-graphics/harfbuzz/harfbuzz_7.1.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/harfbuzz/harfbuzz_7.1.0.bb +2 -0
index 4406e15df4..71c92c64ef 100644
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b98429b8e8e3c2a67cfef01e99e4893d \
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz"
 SRC_URI[sha256sum] = "f135a61cd464c9ed6bc9823764c188f276c3850a8dc904628de2a87966b7077b"
 
+DEPENDS += "glib-2.0-native"
+
 inherit meson pkgconfig lib_package gtk-doc gobject-introspection github-releases
 
 GIR_MESON_ENABLE_FLAG = 'enabled'
Signature · 1 line
2.30.2
#10 lore raw

PATCH v4 8/10 json-glib: depend on glib-2.0-native

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native package dependency is not pulled in but json-glib has a hard dependency on it (do_configure fails due to missing glib-mkenums).

---
 meta/recipes-gnome/json-glib/json-glib_1.6.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/json-glib/json-glib_1.6.6.bb +1 -1
index 627f389536..9c34fb7f40 100644
@@ -9,7 +9,7 @@ BUGTRACKER = "https://gitlab.gnome.org/GNOME/json-glib/issues"
 LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
 
-DEPENDS = "glib-2.0"
+DEPENDS = "glib-2.0 glib-2.0-native"
 
 GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase lib_package gobject-introspection gi-docgen gettext ptest-gnome manpages upstream-version-is-even
Signature · 1 line
2.30.2
#11 lore raw

PATCH v4 9/10 libgudev: depend on glib-2.0-native

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native package dependency is not pulled in but libgudev has a hard dependency on it (do_configure fails due to missing glib-mkenums).

---
 meta/recipes-gnome/libgudev/libgudev_237.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/libgudev/libgudev_237.bb +1 -1
index 9ce43ce34b..5aa94e58f5 100644
@@ -7,7 +7,7 @@ HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
 BUGTRACKER = "https://gitlab.gnome.org/GNOME/libgudev/issues"
 SRC_URI[archive.sha256sum] = "0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aaeb5b9148b686aa"
 
-DEPENDS = "glib-2.0 udev"
+DEPENDS = "glib-2.0 glib-2.0-native udev"
 
 RCONFLICTS:${PN} = "systemd (<= 220)"
 
Signature · 1 line
2.30.2
#12 lore raw

PATCH v4 10/10 at-spi2-core: depend on glib-2.0-native

In reply to Petr Kubizňák

When gobject-introspection feature is disabled, glib-2.0-native package dependency is not pulled in but at-spi2-core has a hard dependency on it (do_configure fails due to missing glib-genmarshal).

---
 meta/recipes-support/atk/at-spi2-core_2.46.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/atk/at-spi2-core_2.46.0.bb +1 -1
index d9161e1acb..90313467d0 100644
@@ -13,7 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
 
 SRC_URI[sha256sum] = "aa0c86c79f7a8d67bae49a5b7a5ab08430c608cffe6e33bf47a72f41ab03c3d0"
 
-DEPENDS = "dbus glib-2.0 libxml2"
+DEPENDS = "dbus glib-2.0 glib-2.0-native libxml2"
 
 # For backwards compatibility
 PROVIDES += "atk at-spi2-atk"
Signature · 1 line
2.30.2
#13 lore raw
In reply to Petr Kubizňák
Quoted 29 lines · Petr Kubizňák

When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled.

---
 meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes-recipe/gobject-introspection.bbclass +1 -2
index 0c7b7d200a..98edb93761 100644
@@ -35,7 +35,7 @@ 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 qemu-native', '', d)}"
 
 # Even though introspection is disabled on -native, gobject-introspection package is still
 # needed for m4 macros.
@@ -46,10 +46,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

meta/classes-recipe/gobject-introspection.bbclass DEPENDS:append:class-nativesdk = " gobject-introspection-native" · line 55

Quoted 10 lines
meta/classes-recipe/gobject-introspection.bbclass +6 -3
-    # 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
 }

Automated testing picked up this issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/6802

which looks like a missing glib2.0-native dependency for vte?

Cheers,

Richard

#14 lore raw

Yes, that's the problem.

I realized bitbake -k world cannot succeed for the x32 architecture so I didn't know how to test it. Now I see I should have executed bitbake core-image-minimal core-image-sato -k. I will send the patch once this command passes on my side.

Best Regards,
Petr

________________________________________
From: Richard Purdie <[email protected]>
Sent: Monday, April 3, 2023 10:14 PM
To: Petr Kubizňák - 2N; [email protected]
Subject: Re: [OE-core][PATCH v4 01/10] gobject-introspection: reduce dependencies

Quoted 29 lines · Petr Kubizňák

When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled.

---
 meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes-recipe/gobject-introspection.bbclass +1 -2
index 0c7b7d200a..98edb93761 100644
@@ -35,7 +35,7 @@ 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 qemu-native', '', d)}"
 
 # Even though introspection is disabled on -native, gobject-introspection package is still
 # needed for m4 macros.
@@ -46,10 +46,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

meta/classes-recipe/gobject-introspection.bbclass DEPENDS:append:class-nativesdk = " gobject-introspection-native" · line 55

Quoted 10 lines
meta/classes-recipe/gobject-introspection.bbclass +6 -3
-    # 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
 }

Automated testing picked up this issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/6802

which looks like a missing glib2.0-native dependency for vte?

Cheers,

Richard

#15 lore raw

Hi Richard,

Thanks for merging the vte patch. I'd like to confirm that the build succeeded on my side yesterday so that should be all prerequisites needed for the "gobject-introspection: reduce dependencies" which has not been merged yet. I've seen that patch was already in master-next but was removed from there. So I just want to make sure it is still somewhere in the queue, not being forgotten.

Thanks,
Petr

________________________________________
From: Petr Kubizňák - 2N <[email protected]>
Sent: Tuesday, April 4, 2023 9:07 AM
To: Richard Purdie; [email protected]
Subject: Re: [OE-core][PATCH v4 01/10] gobject-introspection: reduce dependencies

Yes, that's the problem.

I realized bitbake -k world cannot succeed for the x32 architecture so I didn't know how to test it. Now I see I should have executed bitbake core-image-minimal core-image-sato -k. I will send the patch once this command passes on my side.

Best Regards,
Petr

________________________________________
From: Richard Purdie <[email protected]>
Sent: Monday, April 3, 2023 10:14 PM
To: Petr Kubizňák - 2N; [email protected]
Subject: Re: [OE-core][PATCH v4 01/10] gobject-introspection: reduce dependencies

Quoted 29 lines · Petr Kubizňák

When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled.

---
 meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes-recipe/gobject-introspection.bbclass +1 -2
index 0c7b7d200a..98edb93761 100644
@@ -35,7 +35,7 @@ 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 qemu-native', '', d)}"
 
 # Even though introspection is disabled on -native, gobject-introspection package is still
 # needed for m4 macros.
@@ -46,10 +46,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

meta/classes-recipe/gobject-introspection.bbclass DEPENDS:append:class-nativesdk = " gobject-introspection-native" · line 55

Quoted 10 lines
meta/classes-recipe/gobject-introspection.bbclass +6 -3
-    # 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
 }

Automated testing picked up this issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/6802

which looks like a missing glib2.0-native dependency for vte?

Cheers,

Richard

#16 lore raw

Hi Petr,

Quoted 6 lines · On Wed, 2023-04-05 at 07:05 +0000, Petr Kubizňák - 2N wrote:

Thanks for merging the vte patch. I'd like to confirm that the build succeeded on my side yesterday so that should be all prerequisites needed for the "gobject-introspection: reduce dependencies" which has not been merged yet. I've seen that patch was already in master-next but was removed from there. So I just want to make sure it is still somewhere in the queue, not being forgotten.

We're about to make the mickledore release and that final patch is probably a little bit too risky this late in the release process (feature freeze was several weeks ago).

Adding in the DEPENDS is fine and low risk but as we proved with vte, the other patch does cause fallout and it will impact other layers besides core.

As such I do plan to take it but in the next development cycle. Please remind me if I don't as it is hard to track everything being deferred.

Cheers,

Richard