diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2013-01-18 12:27:12 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-20 13:05:39 +0000 |
commit | 1ca4b36445a5471e9d12ee50708946df9f6baf52 (patch) | |
tree | 6f6194bf56f71476fb608ce2332332b63a4bf61e /scripts/yocto-layer | |
parent | 7b0026ea1250b170ac70e1212d12bb86698e79e9 (diff) | |
download | poky-1ca4b36445a5471e9d12ee50708946df9f6baf52.tar.gz |
yocto-layer: add optional layer priority param
If the user specifies a layer priority following the layer name, layer
creation will proceed without further queries using the specified
layer priority and the remaining values defaulted.
(From meta-yocto rev: 84a0bd8940f82fb938972d7b026367d40c9472e7)
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/yocto-layer')
-rwxr-xr-x | scripts/yocto-layer | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/yocto-layer b/scripts/yocto-layer index f75927552e..53d2aabd3f 100755 --- a/scripts/yocto-layer +++ b/scripts/yocto-layer | |||
@@ -60,19 +60,24 @@ def yocto_layer_create_subcommand(args, usage_str): | |||
60 | default = False, help = "dump the generated code to layergen.out") | 60 | default = False, help = "dump the generated code to layergen.out") |
61 | (options, args) = parser.parse_args(args) | 61 | (options, args) = parser.parse_args(args) |
62 | 62 | ||
63 | if len(args) != 1: | 63 | if len(args) < 1 or len(args) > 2: |
64 | logging.error("Wrong number of arguments, exiting\n") | 64 | logging.error("Wrong number of arguments, exiting\n") |
65 | parser.print_help() | 65 | parser.print_help() |
66 | sys.exit(1) | 66 | sys.exit(1) |
67 | 67 | ||
68 | layer_name = args[0] | 68 | layer_name = args[0] |
69 | properties = "" | ||
70 | |||
71 | if len(args) == 2: | ||
72 | layer_priority = args[1] | ||
73 | properties = '{"layer_priority":"' + layer_priority + '"}' | ||
69 | 74 | ||
70 | if options.outdir: | 75 | if options.outdir: |
71 | layer_output_dir = options.outdir | 76 | layer_output_dir = options.outdir |
72 | else: | 77 | else: |
73 | layer_output_dir = "meta-" + layer_name | 78 | layer_output_dir = "meta-" + layer_name |
74 | 79 | ||
75 | yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file) | 80 | yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties) |
76 | 81 | ||
77 | 82 | ||
78 | def yocto_layer_list_subcommand(args, usage_str): | 83 | def yocto_layer_list_subcommand(args, usage_str): |