[OE-core] [PATCH 3/3][SOLUTION 1] add virtual/netmanager to fix confliction between connman and networkmanager

Hongxu Jia hongxu.jia at windriver.com
Tue Dec 22 08:43:22 UTC 2015


In meta-oe, the networkmanager conflicts with connman.In order to fix
it, we introduce virtual/netmanager and decide which network manager
(connman or networkmanager...) to use by override PREFERRED_PROVIDER_virtual/netmanager.

The connman-plugin-ethernet has been added to connman's
RPROVIDES, so remove it and keep connman is ok.

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
 meta/conf/bitbake.conf                                        | 2 ++
 meta/recipes-connectivity/connman/connman.inc                 | 1 +
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb   | 3 +--
 meta/recipes-extended/images/core-image-kernel-dev.bb         | 2 +-
 meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 371af31..880baf2 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -783,6 +783,8 @@ SHELL[unexport] = "1"
 # Used by canadian-cross to handle string conversions on TARGET_ARCH where needed
 TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH', True).replace("_", "-")}"
 
+PREFERRED_PROVIDER_virtual/netmanager ??= "connman"
+
 # Complete output from bitbake
 BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
 
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index a4b814a..0d40cb9 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -98,6 +98,7 @@ do_install_append() {
 
 # These used to be plugins, but now they are core
 RPROVIDES_${PN} = "\
+	virtual/netmanager \
 	connman-plugin-loopback \
 	connman-plugin-ethernet \
 	${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index d38be26..666896a 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -29,8 +29,7 @@ RDEPENDS_packagegroup-self-hosted = "\
     "
 
 RDEPENDS_packagegroup-self-hosted-host-tools = "\
-    connman \
-    connman-plugin-ethernet \
+    virtual/netmanager \
     dhcp-client \
     e2fsprogs \
     e2fsprogs-e2fsck \
diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb
index 26b88c9..2ea9847 100644
--- a/meta/recipes-extended/images/core-image-kernel-dev.bb
+++ b/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -4,7 +4,7 @@ sensitive to kernel updates and version changes"
 # Could also be core-image-basic, but we'll keep this small for now
 require recipes-core/images/core-image-minimal.bb
 
-KERNEL_DEV_UTILS ?= "dropbear connman"
+KERNEL_DEV_UTILS ?= "dropbear virtual/netmanager"
 KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
 KERNEL_DEV_MODULE ?= "kernel-modules"
 
diff --git a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 6679db8..8e9d5a7 100644
--- a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -20,7 +20,7 @@ RDEPENDS_${PN} = "\
     ${PN}-games \
     "
 
-NETWORK_MANAGER ?= "connman-gnome"
+NETWORK_MANAGER ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/netmanager","connman","connman-gnome","virtual/netmanager",d)}'
 NETWORK_MANAGER_libc-uclibc = ""
 
 SUMMARY_${PN}-base = "Sato desktop - base packages"
-- 
1.9.1




More information about the Openembedded-core mailing list