Skip to contentSkip to conversation

fix confliction between connman and networkmanager

RFC PATCH New Hongxu Jia 1 participant 5 messages Dec 22, 2015

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover fix confliction between connman and networkmanager

Provide two solutions for discussion.

SOLUTION 1: add virtual/netmanager to RPROVIDES and choose connman or

            networkmanager by override PREFERRED_PROVIDER_virtual/netmanager;

SOLUTION 2: add variable NETWORK_MANAGER to RDEPENDS, and select connman or
networkmanager by override NETWORK_MANAGER.

SOLUTION 3: for networkmanager, directly remove RCONFLICTS_${PN} = "connman".
The networkmanager and connman are not file confliction, they just provide the same function. Install both of them is ok.
https://wiki.ubuntu.com/DesktopTeam/ConnectionManagerComparison

If one of them is accepted, we also need to modify networkmanager in meta-oe and related recipes/layers(such as meta-xfce).

//Hongxu

The following changes since commit 0381b78aa4dfc0d338fba69502e8f03a0c0f21e7:

bitbake: event/utils/methodpool: Add a cache of compiled code objects (2015-12-22 00:02:05 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/netmanager-confliction
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/netmanager-confliction

Hongxu Jia (3):
connman.inc: add missing RDEPENDS
connman.inc: add networkmanager to RCONFLICTS
add virtual/netmanager to fix confliction between connman and
networkmanager

 meta/conf/bitbake.conf                                        | 2 ++
 meta/recipes-connectivity/connman/connman.inc                 | 9 ++++++++-
 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, 13 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/3 connman.inc: add missing RDEPENDS

All of the connman-tools, connman-tests and connman-client runtime depends connman.

---
 meta/recipes-connectivity/connman/connman.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman.inc +5 -1
index ba2ca24..76e61b4 100644
@@ -142,11 +142,15 @@ python populate_packages_prepend() {
 PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
 
 FILES_${PN}-tools = "${bindir}/wispr"
+RDEPENDS_${PN}-tools ="${PN}"
 
 FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*"
-RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient"
+RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient \
+                        ${PN} \
+"
 
 FILES_${PN}-client = "${bindir}/connmanctl"
+RDEPENDS_${PN}-client ="${PN}"
 
 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
             ${libdir}/connman/plugins \
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/3 connman.inc: add networkmanager to RCONFLICTS

In reply to Hongxu Jia

Since networkmanager add connman to its RCONFLICTS, The connman should do the same thing.

---
 meta/recipes-connectivity/connman/connman.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-connectivity/connman/connman.inc +2 -0
index 76e61b4..a4b814a 100644
@@ -109,6 +109,8 @@ RDEPENDS_${PN} = "\
 	dbus \
 	"
 
+RCONFLICTS_${PN} = "networkmanager"
+
 PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
 
 def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/3 add variable NETWORK_MANAGER to fix confliction between connman and networkmanager

In reply to Hongxu Jia

In meta-oe, the networkmanager conflicts with connman. In order to fix it, we introduce variable NETWORK_MANAGER which was original used in meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb.

So we could decide which network manager (connman or networkmanager...) to use by override NETWORK_MANAGER.

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

---
 meta/conf/bitbake.conf                                      | 4 ++++
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 3 +--
 meta/recipes-extended/images/core-image-kernel-dev.bb       | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
meta/conf/bitbake.conf +4 -0
index 2b81be1..04fa3ff 100644
@@ -789,6 +789,10 @@ 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("_", "-")}"
 
+# Added to related recipe's RDEPDNS to decide which network manager
+# (connman or networkmanager...) to use
+NETWORK_MANAGER ??= "connman"
+
 # Complete output from bitbake
 BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
 
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -2
index ceaa242..f5291e7 100644
@@ -29,8 +29,7 @@ RDEPENDS_packagegroup-self-hosted = "\
     "
 
 RDEPENDS_packagegroup-self-hosted-host-tools = "\
-    connman \
-    connman-plugin-ethernet \
+    ${NETWORK_MANAGER} \
     dhcp-client \
     e2fsprogs \
     e2fsprogs-e2fsck \
meta/recipes-extended/images/core-image-kernel-dev.bb +1 -1
index 6b636ed..605df46 100644
@@ -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 ${NETWORK_MANAGER}"
 KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
 KERNEL_DEV_MODULE ?= "kernel-modules"
 
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH 3/3 add virtual/netmanager to fix confliction between connman and networkmanager

In reply to Hongxu Jia

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.

---
 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(-)
meta/conf/bitbake.conf +2 -0
index 371af31..880baf2 100644
@@ -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"
 
meta/recipes-connectivity/connman/connman.inc +1 -0
index a4b814a..0d40cb9 100644
@@ -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)} \
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -2
index d38be26..666896a 100644
@@ -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 \
meta/recipes-extended/images/core-image-kernel-dev.bb +1 -1
index 26b88c9..2ea9847 100644
@@ -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"
 
meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb +1 -1
index 6679db8..8e9d5a7 100644
@@ -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"
Signature · 1 line
1.9.1