blob: 44ca7ad625cf94d3dbca8b9e5ccc02ba297e2fa9 [file] [log] [blame]
Brad Bishop93fb5352015-09-09 03:59:20 +00001# Helper functions for checking feature variables.
2
3inherit utils
4
Brad Bishop6ba6a512016-07-10 19:44:42 -04005
Brad Bishop93fb5352015-09-09 03:59:20 +00006def df_enabled(feature, value, d):
Brad Bishop6ba6a512016-07-10 19:44:42 -04007 return base_contains("DISTRO_FEATURES", feature, value, "", d)
8
Brad Bishop93fb5352015-09-09 03:59:20 +00009
10def mf_enabled(feature, value, d):
Brad Bishop6ba6a512016-07-10 19:44:42 -040011 return base_contains("MACHINE_FEATURES", feature, value, "", d)
12
Brad Bishop93fb5352015-09-09 03:59:20 +000013
14def cf_enabled(feature, value, d):
Brad Bishop6ba6a512016-07-10 19:44:42 -040015 return value if df_enabled(feature, value, d) \
16 and mf_enabled(feature, value, d) \
17 else ""