From 300a74f8152264bec0b9e539fbd91e82b481f5a4 Mon Sep 17 00:00:00 2001
From: Stephane Desneux <stephane.desneux@iot.bzh>
Date: Wed, 3 Jul 2019 14:21:08 +0000
Subject: [PATCH] agl-core-connectivity: add avahi-daemon when agl-devel
 feature is set

Accessing the boards using .local addresses is convenient. But avahi-daemon is
not pulled explicitely in images.

This patch adds packagegroup-base-zeroconf (containing avahi-daemon) in the
core image only when agl-devel feature is set and zeroconf is enabled in
DISTRO_FEATURES

Bug-AGL: SPEC-2592

Change-Id: Iea899d98cd0d8628f9533641f7b42c04f4580c64
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
---
 .../packagegroups/packagegroup-agl-core-connectivity.bb                | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb b/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
index 6ef68ca90..03f7e40cd 100644
--- a/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
+++ b/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
@@ -9,11 +9,14 @@ PACKAGES = "\
 
 ALLOW_EMPTY_${PN} = "1"
 
+PKGGROUP_ZEROCONF = "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'packagegroup-base-zeroconf', '', d)}"
+
 RDEPENDS_${PN} += "\
     bluez5-obex \
     dhcp-server \
     ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','connman','connman connman-client connman-tests connman-tools connman-ncurses','',d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "3g", "libqmi", "", d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '${PKGGROUP_ZEROCONF}', '', d)} \
     neard \
     neardal-tools \
     rtl-sdr \
-- 
2.16.6