diff options
| author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
|---|---|---|
| committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
| commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
| tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/classes/distro_features_check.bbclass | |
| download | poky-daisy-140929.tar.gz | |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/classes/distro_features_check.bbclass')
| -rw-r--r-- | meta/classes/distro_features_check.bbclass | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/classes/distro_features_check.bbclass b/meta/classes/distro_features_check.bbclass new file mode 100644 index 0000000000..61b11b7d53 --- /dev/null +++ b/meta/classes/distro_features_check.bbclass | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # Allow checking of required and conflicting DISTRO_FEATURES | ||
| 2 | # | ||
| 3 | # REQUIRED_DISTRO_FEATURES: ensure every item on this list is included | ||
| 4 | # in DISTRO_FEATURES. | ||
| 5 | # CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in | ||
| 6 | # DISTRO_FEATURES. | ||
| 7 | # | ||
| 8 | # Copyright 2013 (C) O.S. Systems Software LTDA. | ||
| 9 | |||
| 10 | python () { | ||
| 11 | required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES', True) | ||
| 12 | if required_distro_features: | ||
| 13 | required_distro_features = required_distro_features.split() | ||
| 14 | distro_features = (d.getVar('DISTRO_FEATURES', True) or "").split() | ||
| 15 | for f in required_distro_features: | ||
| 16 | if f in distro_features: | ||
| 17 | break | ||
| 18 | else: | ||
| 19 | raise bb.parse.SkipPackage("missing required distro feature %s (not in DISTRO_FEATURES)" % required_distro_features) | ||
| 20 | |||
| 21 | conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES', True) | ||
| 22 | if conflict_distro_features: | ||
| 23 | conflict_distro_features = conflict_distro_features.split() | ||
| 24 | distro_features = (d.getVar('DISTRO_FEATURES', True) or "").split() | ||
| 25 | for f in conflict_distro_features: | ||
| 26 | if f in distro_features: | ||
| 27 | raise bb.parse.SkipPackage("conflicting distro feature %s (in DISTRO_FEATURES)" % conflict_distro_features) | ||
| 28 | } | ||
