mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
Based on oe-core commit: commit 1528e596d4906c33e4be83fcf691cfe76d340ff3 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Thu Apr 24 15:59:20 2014 -0300 Globally replace 'base_contains' calls with 'bb.utils.contains' The base_contains is kept as a compatibility method and we ought to not use it in OE-Core so we can remove it from base metadata in future. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
13 lines
403 B
Plaintext
13 lines
403 B
Plaintext
def target_selinux(d, truevar = 'selinux', falsevar = ''):
|
|
if not bb.utils.contains("DISTRO_FEATURES", "selinux", True, False, d):
|
|
return falsevar
|
|
|
|
pn = d.getVar("PN", True)
|
|
type = pn.replace(d.getVar("BPN", True), "")
|
|
if type in ("-native", "nativesdk-", "-cross", "-crosssdk"):
|
|
return falsevar
|
|
|
|
return truevar
|
|
|
|
LIBSELINUX = "${@target_selinux(d, 'libselinux')}"
|