Update agl-cluster-demo-support feature 97/25897/3
authorScott Murray <scott.murray@konsulko.com>
Tue, 12 Jan 2021 22:23:58 +0000 (17:23 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 13 Jan 2021 20:35:47 +0000 (20:35 +0000)
Changes:
- Switch agl-cluster-demo-support from using IMAGE_FEATURES to
  AGL_FEATURES to work better with building the different demo
  images.
- Add a connman bbappend to move the agl-cluster-demo-support
  specific logic out of meta-agl-core.

Bug-AGL: SPEC-3749

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Iad42662db903b7403ec7985c315793fdcd6fc9a7

recipes-connectivity/connman/connman_%.bbappend [new file with mode: 0644]
recipes-connectivity/connman/connman_agldemo.inc [new file with mode: 0644]
recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb
templates/feature/agl-cluster-demo-support/50_local.conf.inc

diff --git a/recipes-connectivity/connman/connman_%.bbappend b/recipes-connectivity/connman/connman_%.bbappend
new file mode 100644 (file)
index 0000000..9bcba76
--- /dev/null
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'connman_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/connman/connman_agldemo.inc b/recipes-connectivity/connman/connman_agldemo.inc
new file mode 100644 (file)
index 0000000..1900cc1
--- /dev/null
@@ -0,0 +1,6 @@
+do_install_append() {
+    # Need to ignore eth1 in cluster demo setup
+    if ${@bb.utils.contains('AGL_FEATURES', 'agl-cluster-demo-support', 'true', 'false', d)}; then
+        sed -i 's/^\(NetworkInterfaceBlacklist=.*\)/\1,eth1/' ${D}${sysconfdir}/connman/main.conf
+    fi
+}
index 53d478c..ee2da2f 100644 (file)
@@ -54,7 +54,7 @@ CLUSTER_SUPPORT_PACKAGES = " \
        cluster-lin-bridging-config \
        cluster-demo-simulator \
 "
-CLUSTER_SUPPORT = "${@bb.utils.contains("DISTRO_FEATURES", "agl-cluster-demo-support", "${CLUSTER_SUPPORT_PACKAGES}", "",d)}"
+CLUSTER_SUPPORT = "${@bb.utils.contains("AGL_FEATURES", "agl-cluster-demo-support", "${CLUSTER_SUPPORT_PACKAGES}", "",d)}"
 
 DEMO_UNIT_CONF ?= ""
 # Hook for demo platform configuration