From fabbdc8b851009163d33c8b64d0251a8cc88e71e Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 2 Dec 2019 14:32:42 +0000 Subject: packagegroup: be lenient about CLANGSDK setting As CLANGSDK defaults to '1', users who have not read the README may think that setting it to '0' would disable adding Clang to the SDK. Little do they know that you need to *unset* the value for this to work (as bool('0') -> True). Change the logic to use bb.utils.contains(), so that '0' is not true. Signed-off-by: Ross Burton --- recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend | 2 +- .../packagegroups/packagegroup-core-standalone-sdk-target.bbappend | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend index 3472eb3..0c8ae6c 100644 --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -1 +1 @@ -RDEPENDS_${PN} += "${@'nativesdk-clang' if '${CLANGSDK}' else ''}" +RDEPENDS_${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'nativesdk-clang', '', d)}" diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend index 2a727e0..59f0959 100644 --- a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend +++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend @@ -1 +1 @@ -RRECOMMENDS_${PN} += "${@'libcxx-dev libcxx-staticdev compiler-rt-dev compiler-rt-staticdev' if '${CLANGSDK}' else ''}" +RRECOMMENDS_${PN} += "${@bb.utils.contains('CLANGSDK', '1', 'libcxx-dev libcxx-staticdev compiler-rt-dev compiler-rt-staticdev', '', d)}" -- cgit v1.2.3-54-g00ecf