Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| oe_yp_backfill [2020/04/11 11:37] – created rpjday | oe_yp_backfill [2020/04/11 12:06] (current) – rpjday | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| How backfilling works. | How backfilling works. | ||
| + | |||
| + | ===== Files ===== | ||
| + | |||
| + | ==== documentation.conf ==== | ||
| + | |||
| + | < | ||
| + | DISTRO_FEATURES[doc] = "The features enabled for the distribution." | ||
| + | DISTRO_FEATURES_BACKFILL[doc] = " | ||
| + | DISTRO_FEATURES_BACKFILL_CONSIDERED[doc] = " | ||
| + | |||
| + | MACHINE_FEATURES[doc] = " | ||
| + | MACHINE_FEATURES_BACKFILL[doc] = " | ||
| + | MACHINE_FEATURES_BACKFILL_CONSIDERED[doc] = " | ||
| + | </ | ||
| + | |||
| + | ==== bitbake.conf ==== | ||
| + | |||
| + | < | ||
| + | DISTRO_FEATURES_BACKFILL = " | ||
| + | MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode" | ||
| + | </ | ||
| + | |||
| + | ==== meta/ | ||
| + | |||
| + | < | ||
| + | def features_backfill(var, | ||
| + | # This construct allows the addition of new features to variable specified | ||
| + | # as var | ||
| + | # Example for var = " | ||
| + | # This construct allows the addition of new features to DISTRO_FEATURES | ||
| + | # that if not present would disable existing functionality, | ||
| + | # disturbing distributions that have already set DISTRO_FEATURES. | ||
| + | # Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should | ||
| + | # add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED | ||
| + | features = (d.getVar(var) or "" | ||
| + | backfill = (d.getVar(var+" | ||
| + | considered = (d.getVar(var+" | ||
| + | |||
| + | addfeatures = [] | ||
| + | for feature in backfill: | ||
| + | if feature not in features and feature not in considered: | ||
| + | addfeatures.append(feature) | ||
| + | |||
| + | if addfeatures: | ||
| + | d.appendVar(var, | ||
| + | </ | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | You can prevent the SysVinit distribution feature from being automatically enabled with one of: | ||
| + | |||
| + | < | ||
| + | DISTRO_FEATURES_BACKFILL_CONSIDERED = " | ||
| + | DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit" | ||
| + | </ | ||