[OE-core] [wic][PATCH] wic: look for wks files in <layer>/recipes-images

Ed Bartosh ed.bartosh at linux.intel.com
Fri Dec 16 20:30:45 UTC 2016


Currently wic looks for wks files in
<layer dir>/scripts/lib/wic/canned-wks/ directories.
This path is too nested and doesn't look consistent with the
naming scheme of layer directories.

Added 'recipes-images' directory to the list of paths
to look for wks files.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 scripts/lib/wic/engine.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 5b10463..8353edb 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -52,6 +52,7 @@ def verify_build_env():
 
 CANNED_IMAGE_DIR = "lib/wic/canned-wks" # relative to scripts
 SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR
+RECIPES_IMAGES_DIR = "recipes-images"
 
 def build_canned_image_list(path):
     layers_path = misc.get_bitbake_var("BBLAYERS")
@@ -59,8 +60,10 @@ def build_canned_image_list(path):
 
     if layers_path is not None:
         for layer_path in layers_path.split():
-            cpath = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
-            canned_wks_layer_dirs.append(cpath)
+            for wks_path in (RECIPES_IMAGES_DIR, SCRIPTS_CANNED_IMAGE_DIR):
+                cpath = os.path.join(layer_path, wks_path)
+                if os.path.isdir(cpath):
+                    canned_wks_layer_dirs.append(cpath)
 
     cpath = os.path.join(path, CANNED_IMAGE_DIR)
     canned_wks_layer_dirs.append(cpath)
-- 
2.1.4




More information about the Openembedded-core mailing list