Skip to contentSkip to conversation

dbus: Let the ptest package install alongside dbus-broker

PATCH Superseded Khem Raj 2 participants 3 messages Oct 31 – Nov 1

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 dbus: Let the ptest package install alongside dbus-broker

dbus-ptest RDEPENDS on dbus, both explicitly and through ptest.bbclass, and dbus-broker RCONFLICTS dbus. With VIRTUAL-RUNTIME_dbus = "dbus-broker" (systemd pulls it in) core-image-ptest-dbus fails in do_rootfs:

package dbus-broker-37-r0.6.cortexa57 conflicts with dbus provided by dbus-1-1.16.2-r0.45.cortexa57 package dbus-ptest-1.16.2-r0.45.cortexa57 requires dbus, but none of the providers can be installed

The installed tests don't use the system bus. They start private buses with dbus-daemon (DBUS_TEST_DAEMON) and use dbus-send, so depend on the dbus-daemon and dbus-tools packages instead and drop the dbus dependency, like avahi does.

With this the images using dbus-broker as the system bus also pass all 60 dbus ptests.

---
 meta/recipes-core/dbus/dbus_1.16.2.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/dbus/dbus_1.16.2.bb +5 -1
index e602c67727..3038d0c5f4 100644
@@ -108,7 +108,11 @@ RRECOMMENDS:${PN}-lib = "${PN}"
 RRECOMMENDS:${PN}-lib:class-target = "${VIRTUAL-RUNTIME_dbus}"
 FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
-RDEPENDS:${PN}-ptest += "bash make dbus"
+# The tests start their own buses with dbus-daemon and talk to them with
+# dbus-send; they don't need the system bus (dbus), which would conflict with
+# other system bus implementations such as dbus-broker.
+RDEPENDS:${PN}-ptest += "bash make ${PN}-daemon ${PN}-tools"
+RDEPENDS:${PN}-ptest:remove = "${PN}"
 
 pkg_postinst:${PN}() {
 	if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
#1 lore raw
Quoted 12 lines · Khem Raj via openembedded-core

dbus-ptest RDEPENDS on dbus, both explicitly and through ptest.bbclass, and dbus-broker RCONFLICTS dbus. With VIRTUAL-RUNTIME_dbus = "dbus-broker" (systemd pulls it in) core-image-ptest-dbus fails in do_rootfs:

package dbus-broker-37-r0.6.cortexa57 conflicts with dbus provided by dbus-1-1.16.2-r0.45.cortexa57 package dbus-ptest-1.16.2-r0.45.cortexa57 requires dbus, but none of the providers can be installed

The installed tests don't use the system bus. They start private buses with dbus-daemon (DBUS_TEST_DAEMON) and use dbus-send, so depend on the dbus-daemon and dbus-tools packages instead and drop the dbus dependency, like avahi does.

Quoted 5 lines

With this the images using dbus-broker as the system bus also pass all 60 dbus ptests.

---

Hi Khem,

It looks like this does not go very well. Most builds fail with:

ERROR: Nothing RPROVIDES 'dbus-daemon' (but /srv/pokybuild/yocto-worker/genericx86-64/build/layers/openembedded-core/meta/recipes-core/dbus/dbus_1.16.2.bb RDEPENDS on or otherwise requires it)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/4953

Can you have a look at the issue?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#2 lore raw
Quoted 27 lines · Mathieu Dubois-Briand
Quoted 2 lines · Khem Raj via openembedded-core

dbus-ptest RDEPENDS on dbus, both explicitly and through ptest.bbclass, and dbus-broker RCONFLICTS dbus. With VIRTUAL-RUNTIME_dbus =

"dbus-broker"

Quoted 3 lines

(systemd pulls it in) core-image-ptest-dbus fails in do_rootfs:

package dbus-broker-37-r0.6.cortexa57 conflicts with dbus provided by

dbus-1-1.16.2-r0.45.cortexa57

Quoted 1 line

package dbus-ptest-1.16.2-r0.45.cortexa57 requires dbus, but none of

the providers can be installed

Quoted 7 lines

The installed tests don't use the system bus. They start private buses with dbus-daemon (DBUS_TEST_DAEMON) and use dbus-send, so depend on the dbus-daemon and dbus-tools packages instead and drop the dbus dependency, like avahi does.

With this the images using dbus-broker as the system bus also pass all

60 dbus

Quoted 4 lines

ptests.

---

Hi Khem,

It looks like this does not go very well. Most builds fail with:

Quoted 8 lines

ERROR: Nothing RPROVIDES 'dbus-daemon' (but /srv/pokybuild/yocto-worker/genericx86-64/build/layers/openembedded-core/meta/recipes-core/dbus/ dbus_1.16.2.bb RDEPENDS on or otherwise requires it)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/4953

Can you have a look at the issue?

sent a v2, it should have added dbus-daemon dependency conditionally. See if this helps.

Quoted 10 lines

Thanks,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com