classes/image: add new task to list defined image features
PATCH 1/1 classes/image: add new task to list defined image features
Add a list_image_features task that lists the available IMAGE_FEATURES for a specific image.
Signed-off-by Ross Burton <[email protected]>
--- meta/classes-recipe/image.bbclass | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
meta/classes-recipe/image.bbclass +23 -0
@@ -702,4 +702,27 @@ reproducible_final_image_task () { IMAGE_PREPROCESS_COMMAND:append = " reproducible_final_image_task " +python do_list_image_features() { + """ + Task to list the available values for IMAGE_FEATURES for a specific image. + """ + features = set() + + for var in d: + if var.startswith("FEATURE_PACKAGES_"): + features.add(var.replace("FEATURE_PACKAGES_", "")) + + for flag in d.getVarFlags("COMPLEMENTARY_GLOB"): + if flag != "doc": + features.add(flag) + + for feat in d.getVarFlag("IMAGE_FEATURES", "validitems").split(): + features.add(feat) + + bb.plain("Available features for IMAGE_FEATURES:") + for feature in sorted(features): + bb.plain(" - " + feature) +} +addtask list_image_features + CVE_PRODUCT = ""
Signature · 1 line
2.43.0