Message ID | 20230331114634.3578244-1-kubiznak@2n.com |
---|---|
State | New |
Headers | show |
Series | [v4,01/10] gobject-introspection: reduce dependencies | expand |
On Fri, 2023-03-31 at 13:46 +0200, Petr Kubizňák wrote: > 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. > > Signed-off-by: Petr Kubizňák <kubiznak@2n.com> > --- > meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/meta/classes-recipe/gobject-introspection.bbclass b/meta/classes-recipe/gobject-introspection.bbclass > index 0c7b7d200a..98edb93761 100644 > --- a/meta/classes-recipe/gobject-introspection.bbclass > +++ b/meta/classes-recipe/gobject-introspection.bbclass > @@ -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 > } 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
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
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
Hi Petr, 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
diff --git a/meta/classes-recipe/gobject-introspection.bbclass b/meta/classes-recipe/gobject-introspection.bbclass index 0c7b7d200a..98edb93761 100644 --- a/meta/classes-recipe/gobject-introspection.bbclass +++ b/meta/classes-recipe/gobject-introspection.bbclass @@ -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
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. Signed-off-by: Petr Kubizňák <kubiznak@2n.com> --- meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)