[OE-core] [PATCH v2] scripts/yocto-layer Change to the yocto-layer script. The fix avoids the duplication of the "meta-" prefix on the layer directory when creating a new layer with the prefix already there. Made the script inside the create subcommand method since it's a change specific to the creation of layers and parsing it in the main method was not the way to go.
humberto.ibarra.lopez at intel.com
humberto.ibarra.lopez at intel.com
Tue Dec 8 17:22:01 UTC 2015
From: Humberto Ibarra <humberto.ibarra.lopez at intel.com>
Before the change:
$ yocto-layer create meta-layer2
...
New layer created in meta-meta-layer2.
---------
After the change:
$ yocto-layer create meta-layer2
...
New layer created in meta-layer2.
Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez at intel.com>
---
scripts/yocto-layer | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/yocto-layer b/scripts/yocto-layer
index 53d2aab..313d464 100755
--- a/scripts/yocto-layer
+++ b/scripts/yocto-layer
@@ -75,7 +75,11 @@ def yocto_layer_create_subcommand(args, usage_str):
if options.outdir:
layer_output_dir = options.outdir
else:
- layer_output_dir = "meta-" + layer_name
+ prefix="meta-"
+ if not layer_name.startswith(prefix):
+ layer_output_dir="%s%s"%(prefix,layer_name)
+ else:
+ layer_output_dir=layer_name
yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties)
--
1.9.1
More information about the Openembedded-core
mailing list