meta-selinux/classes/selinux.bbclass
Joe MacDonald aa85e81d94 Globally replace 'base_contains' calls with 'bb.utils.contains'
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>
2014-09-16 21:05:00 -04:00

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')}"