From 9274d017f23da2574f8aedc185399f91168c799d Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Wed, 6 Dec 2017 18:21:37 +0530 Subject: phosphor-discovery: Fixes some conditional check Correct the return values from string to boolean of distro feature check for avahi and slp. This commit also correct the check if slp and avahi is not enabled then return Change-Id: I2a19c14fdaf19523702062e6466d636080eeabe6 Signed-off-by: Ratan Gupta --- .../classes/obmc-phosphor-discovery-service.bbclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'meta-phosphor/classes') diff --git a/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass b/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass index 73a4875df..313402ff3 100644 --- a/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass @@ -3,12 +3,12 @@ DISCOVERY_SVC_PACKAGES ?= "${PN}" python() { avahi_enabled = bb.utils.contains( - 'DISTRO_FEATURES', 'avahi', 'true', 'false', d) + 'DISTRO_FEATURES', 'avahi', True, False, d) slp_enabled = bb.utils.contains( - 'DISTRO_FEATURES', 'slp', 'true', 'false', d) + 'DISTRO_FEATURES', 'slp', True, False, d) - if not avahi_enabled and slp_enabled: + if not avahi_enabled and not slp_enabled: return syscnfdir = d.getVar('sysconfdir', True) @@ -48,11 +48,11 @@ python() { python discovery_services_postinstall() { avahi_enabled = bb.utils.contains( - 'DISTRO_FEATURES', 'avahi', 'true', 'false', d) + 'DISTRO_FEATURES', 'avahi', True, False, d) slp_enabled = bb.utils.contains( - 'DISTRO_FEATURES', 'slp', 'true', 'false', d) + 'DISTRO_FEATURES', 'slp', True, False, d) - if not avahi_enabled and slp_enabled: + if not avahi_enabled and not slp_enabled: return avahi_service_dir = d.getVar('AVAHI_SERVICES_DIR', True).strip() -- cgit v1.2.1