diff mbox series

[v3,3/6] dbus-glib: Support using alternative runtime D-Bus

Message ID 20250401113129.3531757-3-niko.mauno@vaisala.com
State New
Headers show
Series [v3,1/6] default-providers: Add VIRTUAL-RUNTIME_dbus variable | expand

Commit Message

Niko Mauno April 1, 2025, 11:31 a.m. UTC
In order to facilitate oe-core users who wish to use e.g. dbus-broker
as their runtime D-Bus implementation, decouple the target specific
dbus-glib runtime recommendation to honor the new VIRTUAL-RUNTIME_dbus
variable.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
 meta/recipes-core/dbus/dbus-glib_0.114.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Richard Purdie April 1, 2025, 12:29 p.m. UTC | #1
On Tue, 2025-04-01 at 11:31 +0000, Niko Mauno via
lists.openembedded.org wrote:
> In order to facilitate oe-core users who wish to use e.g. dbus-broker
> as their runtime D-Bus implementation, decouple the target specific
> dbus-glib runtime recommendation to honor the new VIRTUAL-
> RUNTIME_dbus
> variable.
> 
> Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
> ---
>  meta/recipes-core/dbus/dbus-glib_0.114.bb | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/dbus/dbus-glib_0.114.bb
> b/meta/recipes-core/dbus/dbus-glib_0.114.bb
> index ff7c2d6613..7908a02747 100644
> --- a/meta/recipes-core/dbus/dbus-glib_0.114.bb
> +++ b/meta/recipes-core/dbus/dbus-glib_0.114.bb
> @@ -38,7 +38,9 @@ LICENSE:${PN}-bash-completion = "GPL-2.0-or-later"
>  FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-
> tool"
>  FILES:${PN}-dev += "${bindir}/dbus-binding-tool"
>  
> -RDEPENDS:${PN}-tests += "dbus"
> +RDEPENDS:${PN}-tests:class-target += "${VIRTUAL-RUNTIME_dbus}"
> +RDEPENDS:${PN}-tests:class-native += "dbus"
> +RDEPENDS:${PN}-tests:class-nativesdk += "dbus"
>  

This looks convoluted and probably incorrect and unnecessary.

I'd suggest changing this to:

RDEPENDS:${PN}-tests = "${PN}"

and then relying on the main library having the right dependencies
(which it has). The tests need the library to run anyway.

Cheers,

Richard
Niko Mauno April 1, 2025, 2:09 p.m. UTC | #2
On 1.4.2025 15.29, Richard Purdie wrote:
> On Tue, 2025-04-01 at 11:31 +0000, Niko Mauno via
> lists.openembedded.org wrote:
>> In order to facilitate oe-core users who wish to use e.g. dbus-broker
>> as their runtime D-Bus implementation, decouple the target specific
>> dbus-glib runtime recommendation to honor the new VIRTUAL-
>> RUNTIME_dbus
>> variable.
>>
>> Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
>> ---
>>   meta/recipes-core/dbus/dbus-glib_0.114.bb | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/dbus/dbus-glib_0.114.bb
>> b/meta/recipes-core/dbus/dbus-glib_0.114.bb
>> index ff7c2d6613..7908a02747 100644
>> --- a/meta/recipes-core/dbus/dbus-glib_0.114.bb
>> +++ b/meta/recipes-core/dbus/dbus-glib_0.114.bb
>> @@ -38,7 +38,9 @@ LICENSE:${PN}-bash-completion = "GPL-2.0-or-later"
>>   FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-
>> tool"
>>   FILES:${PN}-dev += "${bindir}/dbus-binding-tool"
>>   
>> -RDEPENDS:${PN}-tests += "dbus"
>> +RDEPENDS:${PN}-tests:class-target += "${VIRTUAL-RUNTIME_dbus}"
>> +RDEPENDS:${PN}-tests:class-native += "dbus"
>> +RDEPENDS:${PN}-tests:class-nativesdk += "dbus"
>>   
> 
> This looks convoluted and probably incorrect and unnecessary.
> 
> I'd suggest changing this to:
> 
> RDEPENDS:${PN}-tests = "${PN}"
> 
> and then relying on the main library having the right dependencies
> (which it has). The tests need the library to run anyway.
> 
> Cheers,
> 
> Richard
> 

Thank you Richard, submitted v4 which includes the suggested change.
-Niko
diff mbox series

Patch

diff --git a/meta/recipes-core/dbus/dbus-glib_0.114.bb b/meta/recipes-core/dbus/dbus-glib_0.114.bb
index ff7c2d6613..7908a02747 100644
--- a/meta/recipes-core/dbus/dbus-glib_0.114.bb
+++ b/meta/recipes-core/dbus/dbus-glib_0.114.bb
@@ -38,7 +38,9 @@  LICENSE:${PN}-bash-completion = "GPL-2.0-or-later"
 FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
 FILES:${PN}-dev += "${bindir}/dbus-binding-tool"
 
-RDEPENDS:${PN}-tests += "dbus"
+RDEPENDS:${PN}-tests:class-target += "${VIRTUAL-RUNTIME_dbus}"
+RDEPENDS:${PN}-tests:class-native += "dbus"
+RDEPENDS:${PN}-tests:class-nativesdk += "dbus"
 FILES:${PN}-tests = "${datadir}/${BPN}/tests"
 
 BBCLASSEXTEND = "native"