Patchwork dbus: include dbus-launch in the main dbus package

login
register
mail settings
Submitter Radu Moisan
Date July 25, 2012, 2:03 p.m.
Message ID <1343225031-19107-1-git-send-email-radu.moisan@intel.com>
Download mbox | patch
Permalink /patch/33039/
State New
Headers show

Comments

Phil Blundell - July 25, 2012, 1:58 p.m.
On Wed, 2012-07-25 at 17:03 +0300, Radu Moisan wrote:
> +# for compatibility
> +RPROVIDES = "${PN}-x11"

ITYM RPROVIDES_${PN}.  Isn't that a QA error?

p.
Radu Moisan - July 25, 2012, 2:03 p.m.
Followed suggestions from Bugz 2261:

1) remove the --with-x/--without-x configure arguments. If you want to force
no-discovery for native builds the correct argument is --disable-x11-autolaunch.
This ensures that DBus looks at the build environment to determine whether to
enable X11 bus discovery or not.

2) make the virtual/libx11 DEPENDS conditional based on the x11 distro feature.
This makes the build dependencies reflect the feature list.

3) remove dbus-x11, meaning that dbus-launch with its potential X11 dependency
is now back in dbus where is belongs.

4) Potentially make dbus provide dbus-x11, for compatibility.

Fixes [Yocto #2261]

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
---
 meta/recipes-core/dbus/dbus.inc |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Koen Kooi - July 25, 2012, 2:16 p.m.
Op 25 jul. 2012, om 15:58 heeft Phil Blundell het volgende geschreven:

> On Wed, 2012-07-25 at 17:03 +0300, Radu Moisan wrote:
>> +# for compatibility
>> +RPROVIDES = "${PN}-x11"
> 
> ITYM RPROVIDES_${PN}.  Isn't that a QA error?

Sadly not, you need to run kergoths recipe_sanity manually to catch this one.
Koen Kooi - July 25, 2012, 2:17 p.m.
Op 25 jul. 2012, om 16:03 heeft Radu Moisan het volgende geschreven:

> Followed suggestions from Bugz 2261:
> 
> 1) remove the --with-x/--without-x configure arguments. If you want to force
> no-discovery for native builds the correct argument is --disable-x11-autolaunch.
> This ensures that DBus looks at the build environment to determine whether to
> enable X11 bus discovery or not.
> 
> 2) make the virtual/libx11 DEPENDS conditional based on the x11 distro feature.
> This makes the build dependencies reflect the feature list.
> 
> 3) remove dbus-x11, meaning that dbus-launch with its potential X11 dependency
> is now back in dbus where is belongs.
> 
> 4) Potentially make dbus provide dbus-x11, for compatibility.

This breaks the upgrade path
Ross Burton - July 25, 2012, 2:19 p.m.
On 25 July 2012 15:17, Koen Kooi <koen@dominion.thruhere.net> wrote:
> This breaks the upgrade path

So how would the upgrade path be unbroken?  A dummy dbus-x11 package
that pulls in dbus, I suspect.

Ross
Paul Eggleton - July 25, 2012, 2:23 p.m.
On Wednesday 25 July 2012 15:19:10 Burton, Ross wrote:
> On 25 July 2012 15:17, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > This breaks the upgrade path
> 
> So how would the upgrade path be unbroken?  A dummy dbus-x11 package
> that pulls in dbus, I suspect.

RREPLACES_${PN} += "dbus-x11" ought to be enough...

Cheers,
Paul
Ross Burton - July 25, 2012, 2:24 p.m.
On 25 July 2012 15:23, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> On Wednesday 25 July 2012 15:19:10 Burton, Ross wrote:
>> On 25 July 2012 15:17, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> > This breaks the upgrade path
>>
>> So how would the upgrade path be unbroken?  A dummy dbus-x11 package
>> that pulls in dbus, I suspect.
>
> RREPLACES_${PN} += "dbus-x11" ought to be enough...

Sweet (makes mental note)

Ross
Koen Kooi - July 25, 2012, 2:49 p.m.
Op 25 jul. 2012, om 16:23 heeft Paul Eggleton het volgende geschreven:

> On Wednesday 25 July 2012 15:19:10 Burton, Ross wrote:
>> On 25 July 2012 15:17, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> This breaks the upgrade path
>> 
>> So how would the upgrade path be unbroken?  A dummy dbus-x11 package
>> that pulls in dbus, I suspect.
> 
> RREPLACES_${PN} += "dbus-x11" ought to be enough...

Right, but since that's missing -> broken upgrade path

Patch

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index a75583d..903f232 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -31,10 +31,9 @@  CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib ${PN}-systemd ${@base_contains('DISTRO_FEATURES', 'x11', '${PN}-x11', '', d)}"
-
-FILES_${PN}-x11 = "${bindir}/dbus-launch"
-RDEPENDS_${PN}-x11 = "${PN}"
+PACKAGES =+ "${PN}-lib ${PN}-systemd"
+# for compatibility
+RPROVIDES = "${PN}-x11"
 
 FILES_${PN}-systemd = "${systemd_unitdir}/system/"
 
@@ -43,6 +42,7 @@  FILES_${PN} = "${bindir}/dbus-daemon* \
                ${bindir}/dbus-cleanup-sockets \
                ${bindir}/dbus-send \
                ${bindir}/dbus-monitor \
+               ${bindir}/dbus-launch \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
@@ -58,8 +58,8 @@  pkg_postinst_dbus() {
 	fi
 }
 
-EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_virtclass-native = "--without-x"
+EXTRA_OECONF_X = ""
+EXTRA_OECONF_X_virtclass-native = "--disable-x11-autolaunch"
 
 EXTRA_OECONF = "--disable-tests \
                 --disable-checks \