aboutsummaryrefslogtreecommitdiffstats
path: root/meta-mentor-common/classes/user_features.bbclass
blob: 385e7aa5a816f28f708083c72d8e9f2496e08e09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ---------------------------------------------------------------------------------------------------------------------
# SPDX-License-Identifier: MIT
# ---------------------------------------------------------------------------------------------------------------------

# USER_FEATURES is an explicitly supported mechanism to exert control over
# DISTRO_FEATURES from local.conf without directly poking at it. At this point
# it's just a convenience wrapper around append and remove.
#
# To add a feature, simply add it to USER_FEATURES. To remove a feature, add
# the feature prefixed by ~. For example: USER_FEATURES += "bluetooth"

USER_FEATURES ?= ""
USER_FEATURES_REMOVE ?= "${@' '.join(l[1:] for l in '${USER_FEATURES}'.split() if l.startswith('~'))}"
DISTRO_FEATURES:append = " ${@' '.join(l for l in '${USER_FEATURES}'.split() if not l.startswith('~'))}"
DISTRO_FEATURES:remove = "${USER_FEATURES_REMOVE}"