From 8c9320cc922a165946ac557f0bda2e29ab794951 Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Mon, 11 Mar 2013 22:36:44 -0500 Subject: yocto-kernel: add support for destroying recipe-space kernel features Add a yocto-kernel command allowing users to destroy a recipe-space kernel feature local to a particular BSP. The removed feature is subsequently no longer available for the normal feature addition and removal yocto-kernel commands. (From meta-yocto rev: faa18f56d9412694f2c8e0b0c09e751cb7f3a743) Signed-off-by: Tom Zanussi Signed-off-by: Richard Purdie --- scripts/yocto-kernel | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'scripts/yocto-kernel') diff --git a/scripts/yocto-kernel b/scripts/yocto-kernel index 69fe344d8d..c9b2821e00 100755 --- a/scripts/yocto-kernel +++ b/scripts/yocto-kernel @@ -287,6 +287,26 @@ def yocto_kernel_feature_create_subcommand(args, usage_str): yocto_kernel_feature_create(scripts_path, machine, args) +def yocto_kernel_feature_destroy_subcommand(args, usage_str): + """ + Command-line handling for removing a recipe-space kernel feature + from a BSP. The real work is done by + bsp.kernel.yocto_kernel_feature_destroy(). + """ + logging.debug("yocto_kernel_feature_destroy_subcommand") + + parser = optparse.OptionParser(usage = usage_str) + + (options, args) = parser.parse_args(args) + + if len(args) != 2: + logging.error("Wrong number of arguments, exiting\n") + parser.print_help() + sys.exit(1) + + yocto_kernel_feature_destroy(scripts_path, args[0], args[1]) + + subcommands = { "config-list": [yocto_kernel_config_list_subcommand, yocto_kernel_config_list_usage, @@ -324,6 +344,9 @@ subcommands = { "feature-create": [yocto_kernel_feature_create_subcommand, yocto_kernel_feature_create_usage, yocto_kernel_feature_create_help], + "feature-destroy": [yocto_kernel_feature_destroy_subcommand, + yocto_kernel_feature_destroy_usage, + yocto_kernel_feature_destroy_help], } -- cgit v1.2.3-54-g00ecf