summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2019-06-05 23:38:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-07 09:10:33 +0100
commit2c0a292a790ad069648e37b1b29fcea656fcf3e4 (patch)
tree42a414f85b9b8dc027899beb72c6495d8569d5a2 /scripts
parent147d66495622332fdbf3cb1d0c3f0948402e1d1b (diff)
downloadopenembedded-core-contrib-2c0a292a790ad069648e37b1b29fcea656fcf3e4.tar.gz
wic/engine: include .wks.in in wic search and list
allow wic to list and search for kickstart file in .wks.in extension. basename show by wic list images to fully exclude extension. Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/engine.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 42e93c3eb8..61939ad194 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -75,7 +75,8 @@ def find_canned_image(scripts_path, wks_file):
for fname in files:
if fname.endswith("~") or fname.endswith("#"):
continue
- if fname.endswith(".wks") and wks_file + ".wks" == fname:
+ if ((fname.endswith(".wks") and wks_file + ".wks" == fname) or \
+ (fname.endswith(".wks.in") and wks_file + ".wks.in" == fname)):
fullpath = os.path.join(canned_wks_dir, fname)
return fullpath
return None
@@ -92,7 +93,7 @@ def list_canned_images(scripts_path):
for fname in files:
if fname.endswith("~") or fname.endswith("#"):
continue
- if fname.endswith(".wks"):
+ if fname.endswith(".wks") or fname.endswith(".wks.in"):
fullpath = os.path.join(canned_wks_dir, fname)
with open(fullpath) as wks:
for line in wks:
@@ -101,7 +102,7 @@ def list_canned_images(scripts_path):
if idx != -1:
desc = line[idx + len("short-description:"):].strip()
break
- basename = os.path.splitext(fname)[0]
+ basename = fname.split('.')[0]
print(" %s\t\t%s" % (basename.ljust(30), desc))