Skip to contentSkip to conversation

dbus: only use x11 if DISTRO_FEATURES has selected it

PATCH Applied Phil Blundell 6 participants 6 messages Aug 12, 2011 – Oct 25, 2012

lore
Share & tools
lore
#0 lore raw

This makes it possible to include dbus in a non-X11-equipped DISTRO.

---
 meta/recipes-core/dbus/dbus.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/dbus/dbus.inc +4 -3
index 6b76cba..a8ecda8 100644
@@ -5,7 +5,8 @@ SECTION = "base"
 LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
 DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"
 
@@ -22,7 +23,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib ${PN}-x11 ${PN}-systemd"
+PACKAGES =+ "${PN}-lib ${PN}-systemd ${@base_contains('DISTRO_FEATURES', 'x11', '${PN}-x11', '', d)}"
 
 FILES_${PN}-x11 = "${bindir}/dbus-launch"
 RDEPENDS_${PN}-x11 = "${PN}"
@@ -73,7 +74,7 @@ pkg_postinst_dbus() {
 	fi
 }
 
-EXTRA_OECONF_X = "--with-x"
+EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
 EXTRA_OECONF_X_virtclass-native = "--without-x"
 
 EXTRA_OECONF = "--disable-tests \
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 31 lines · Phil Blundell

This makes it possible to include dbus in a non-X11-equipped DISTRO.

---
  meta/recipes-core/dbus/dbus.inc |    7 ++++---
  1 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/dbus/dbus.inc +3 -2
index 6b76cba..a8ecda8 100644
@@ -5,7 +5,8 @@ SECTION = "base"
  LICENSE = "AFL-2 | GPLv2+"
  LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                      file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
  DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
  DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"
 
@@ -22,7 +23,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
  DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib ${PN}-x11 ${PN}-systemd"
+PACKAGES =+ "${PN}-lib ${PN}-systemd ${@base_contains('DISTRO_FEATURES', 'x11', '${PN}-x11', '', d)}"
 
  FILES_${PN}-x11 = "${bindir}/dbus-launch"
  RDEPENDS_${PN}-x11 = "${PN}"

meta/recipes-core/dbus/dbus.inc pkg_postinst_dbus() { · line 80

Quoted 8 lines
meta/recipes-core/dbus/dbus.inc +1 -1
@@ -73,7 +74,7 @@ pkg_postinst_dbus() {
  	fi
  }
 
-EXTRA_OECONF_X = "--with-x"
+EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
  EXTRA_OECONF_X_virtclass-native = "--without-x"
 
  EXTRA_OECONF = "--disable-tests \

Merged into OE-Core

Thanks
Sau!

#2 lore raw
In reply to Phil Blundell
Quoted 1 line · Phil Blundell

This makes it possible to include dbus in a non-X11-equipped DISTRO.

I have a follow up question on this old change...

Quoted 10 lines
---
 meta/recipes-core/dbus/dbus.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/dbus/dbus.inc +0 -0
index 6b76cba..a8ecda8 100644

meta/recipes-core/dbus/dbus.inc SECTION = "base" · line 11

Quoted 8 lines
meta/recipes-core/dbus/dbus.inc +2 -1
@@ -5,7 +5,8 @@ SECTION = "base"
 LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
 DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"

Would there be any objections extending this DISTRO check to nativesdk as well?

Signature · 1 line
Denys
Quoted 29 lines
meta/recipes-core/dbus/dbus.inc +2 -2
@@ -22,7 +23,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib ${PN}-x11 ${PN}-systemd"
+PACKAGES =+ "${PN}-lib ${PN}-systemd ${@base_contains('DISTRO_FEATURES', 'x11', '${PN}-x11', '', d)}"
 
 FILES_${PN}-x11 = "${bindir}/dbus-launch"
 RDEPENDS_${PN}-x11 = "${PN}"
@@ -73,7 +74,7 @@ pkg_postinst_dbus() {
 	fi
 }
 
-EXTRA_OECONF_X = "--with-x"
+EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
 EXTRA_OECONF_X_virtclass-native = "--without-x"
 
 EXTRA_OECONF = "--disable-tests \
Signature · 9 lines
1.7.4.1




_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
#3 lore raw
Quoted 8 lines · Denys Dmytriyenko

meta/recipes-core/dbus/dbus.inc SECTION = "base" · line 11

Quoted 5 lines
meta/recipes-core/dbus/dbus.inc +2 -1
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
 DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"

Would there be any objections extending this DISTRO check to nativesdk as well?

Makes sense for nativesdk I guess. Tested patches welcome!

Ross

#4 lore raw
In reply to Denys Dmytriyenko
Quoted 20 lines · On Thursday 25 October 2012 00:08:26 Denys Dmytriyenko wrote:
Quoted 1 line · Phil Blundell

This makes it possible to include dbus in a non-X11-equipped DISTRO.

I have a follow up question on this old change...

Quoted 15 lines

---

 meta/recipes-core/dbus/dbus.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/dbus/dbus.inc index 6b76cba..a8ecda8 100644

meta/recipes-core/dbus/dbus.inc +0 -0
@@ -5,7 +5,8 @@ SECTION = "base"
 
 LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
 
Quoted 12 lines
Quoted 9 lines
meta/recipes-core/dbus/dbus.inc +2 -1
                     file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0
                     c7750dd8e620dcb1437312fa5"> 
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES',

'x11', '${X11DEPENDS}', '', d)}">
DEPENDS_virtclass-native = "expat-native virtual/libintl-native" DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"

Would there be any objections extending this DISTRO check to nativesdk as well?

We did have a request not so long ago to be able to have x11 enabled in the nativesdk (for development tools that need X) but disabled on the target. I'm pretty sure we already have a lot of places where DISTRO_FEATURES will influence nativesdk, but I suspect the configuration may need to be separated for these two at some point.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw
Quoted 34 lines · Paul Eggleton
Quoted 20 lines · On Thursday 25 October 2012 00:08:26 Denys Dmytriyenko wrote:
Quoted 1 line · Phil Blundell

This makes it possible to include dbus in a non-X11-equipped DISTRO.

I have a follow up question on this old change...

Quoted 15 lines

---

 meta/recipes-core/dbus/dbus.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/dbus/dbus.inc index 6b76cba..a8ecda8 100644

meta/recipes-core/dbus/dbus.inc +0 -0
@@ -5,7 +5,8 @@ SECTION = "base"
 
 LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
 
Quoted 12 lines
Quoted 9 lines
meta/recipes-core/dbus/dbus.inc +2 -1
                     file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0
                     c7750dd8e620dcb1437312fa5"> 
-DEPENDS = "expat virtual/libintl virtual/libx11 libsm"
+X11DEPENDS = "virtual/libx11 libsm"
+DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES',

'x11', '${X11DEPENDS}', '', d)}">
DEPENDS_virtclass-native = "expat-native virtual/libintl-native" DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"

Would there be any objections extending this DISTRO check to nativesdk as well?

Quoted 5 lines

We did have a request not so long ago to be able to have x11 enabled in the nativesdk (for development tools that need X) but disabled on the target. I'm pretty sure we already have a lot of places where DISTRO_FEATURES will influence nativesdk, but I suspect the configuration may need to be separated for these two at some point.

There is a nasty subtlety in this request which I've noticed with dbus-native on my local builds.

If I launch a devshell, then within it try and launch a local X app which uses dbus, it finds the dbus in the native sysroot, not the host system one. Since X11 is disabled in the native dbus, it then generall gives me nasty errors and breaks the X app I wanted to run.

So far I've just ignored this but it will do the same thing to nativesdk, namely break X apps once the dbus-nativesdk is in PATH.

So I'm not sure disabling X11 is a good idea here. Perhaps not installing the dbus binaries into PATH for nativesdk might be good enough to avoid undesired affects but we need to think it through very carefully and the request isn't as simple as it first appears.

Cheers,

Richard