* [meta-oe][PATCH] libgpiod: selectively enable GObject introspection
@ 2024-10-30 20:53 Bartosz Golaszewski
2024-10-30 21:02 ` Martin Jansa
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2024-10-30 20:53 UTC (permalink / raw)
To: Khem Raj, Max Krummenacher, Martin Jansa, Bruce Ashfield,
openembedded-devel
Cc: Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
The oe-core bbclass for GObject introspection sets GI_DATA_ENABLED if
the relevant distro feature is enabled. That means that it's up to the
inheriting recipe to disable it if needed.
For libgpiod: we only want to enable it if any of the GLib based
packages is being generated (GLib bindings, D-Bus daemon or ptest).
This also effectively reverts commit 78a332939f8b (libgpiod_2.2: depend
on glib-2.0) which indiscriminately pulls in GLib for all packages
generated by this recipe which feels like shooting a fly with a cannon.
Fixes: 9626e8a2c8f2 ("libgpiod: update to v2.2")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
index 3d9758e27a..25f3734a16 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = " \
file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
"
-DEPENDS += "glib-2.0"
-
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
SRC_URI += "file://gpio-manager.init"
@@ -61,6 +59,10 @@ python __anonymous() {
d.setVar("SYSTEMD_SERVICE:{}-manager".format(pn), "gpio-manager.service")
else:
d.appendVar("EXTRA_OECONF", " --disable-systemd")
+
+ # Disable gobject introspection set by the bbclass if we don't want it.
+ if not any(cfg in ["glib", "dbus", "ptest"] for cfg in packageconfig):
+ d.setVar("GI_DATA_ENABLED", "False")
}
UPDATERCPN = "${PN}-manager"
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [meta-oe][PATCH] libgpiod: selectively enable GObject introspection
2024-10-30 20:53 [meta-oe][PATCH] libgpiod: selectively enable GObject introspection Bartosz Golaszewski
@ 2024-10-30 21:02 ` Martin Jansa
2024-10-31 16:41 ` Bartosz Golaszewski
0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2024-10-30 21:02 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Khem Raj, Max Krummenacher, Bruce Ashfield, openembedded-devel,
Bartosz Golaszewski
Please use BPN in:
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
I could send another separate fix, but then it would conflict with
this one, so probably better if you send v2 with it.
On Wed, Oct 30, 2024 at 9:54 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The oe-core bbclass for GObject introspection sets GI_DATA_ENABLED if
> the relevant distro feature is enabled. That means that it's up to the
> inheriting recipe to disable it if needed.
>
> For libgpiod: we only want to enable it if any of the GLib based
> packages is being generated (GLib bindings, D-Bus daemon or ptest).
>
> This also effectively reverts commit 78a332939f8b (libgpiod_2.2: depend
> on glib-2.0) which indiscriminately pulls in GLib for all packages
> generated by this recipe which feels like shooting a fly with a cannon.
>
> Fixes: 9626e8a2c8f2 ("libgpiod: update to v2.2")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
> index 3d9758e27a..25f3734a16 100644
> --- a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
> @@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = " \
> file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
> "
>
> -DEPENDS += "glib-2.0"
> -
> FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
>
> SRC_URI += "file://gpio-manager.init"
> @@ -61,6 +59,10 @@ python __anonymous() {
> d.setVar("SYSTEMD_SERVICE:{}-manager".format(pn), "gpio-manager.service")
> else:
> d.appendVar("EXTRA_OECONF", " --disable-systemd")
> +
> + # Disable gobject introspection set by the bbclass if we don't want it.
> + if not any(cfg in ["glib", "dbus", "ptest"] for cfg in packageconfig):
> + d.setVar("GI_DATA_ENABLED", "False")
> }
>
> UPDATERCPN = "${PN}-manager"
> --
> 2.45.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [meta-oe][PATCH] libgpiod: selectively enable GObject introspection
2024-10-30 21:02 ` Martin Jansa
@ 2024-10-31 16:41 ` Bartosz Golaszewski
2024-10-31 16:46 ` Martin Jansa
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2024-10-31 16:41 UTC (permalink / raw)
To: Martin Jansa
Cc: Khem Raj, Max Krummenacher, Bruce Ashfield, openembedded-devel,
Bartosz Golaszewski
On Wed, Oct 30, 2024 at 10:02 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Please use BPN in:
> FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
>
> I could send another separate fix, but then it would conflict with
> this one, so probably better if you send v2 with it.
>
This patch is already in master-next so just go ahead and add your
change on top.
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [meta-oe][PATCH] libgpiod: selectively enable GObject introspection
2024-10-31 16:41 ` Bartosz Golaszewski
@ 2024-10-31 16:46 ` Martin Jansa
0 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2024-10-31 16:46 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Khem Raj, Max Krummenacher, Bruce Ashfield, openembedded-devel,
Bartosz Golaszewski
I already did few hours ago, see:
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=8a676c670c437828f74c552c518f3e0bea624c81
On Thu, Oct 31, 2024 at 5:41 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Wed, Oct 30, 2024 at 10:02 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > Please use BPN in:
> > FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
> >
> > I could send another separate fix, but then it would conflict with
> > this one, so probably better if you send v2 with it.
> >
>
> This patch is already in master-next so just go ahead and add your
> change on top.
>
> Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-31 16:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-30 20:53 [meta-oe][PATCH] libgpiod: selectively enable GObject introspection Bartosz Golaszewski
2024-10-30 21:02 ` Martin Jansa
2024-10-31 16:41 ` Bartosz Golaszewski
2024-10-31 16:46 ` Martin Jansa
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.