summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-19 18:51:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 21:30:37 +0000
commit33dd323ec6a1a1ed4e1a04e51de182c89c7b6bd9 (patch)
tree26856cf33131b3f4a5b105e4447342c591168ca7
parentba98262573cf1600e0d477317f51d488b5f8c4bd (diff)
downloadopenembedded-core-contrib-33dd323ec6a1a1ed4e1a04e51de182c89c7b6bd9.tar.gz
openembedded-core-contrib-33dd323ec6a1a1ed4e1a04e51de182c89c7b6bd9.tar.bz2
openembedded-core-contrib-33dd323ec6a1a1ed4e1a04e51de182c89c7b6bd9.zip
wic: ksparser: add support for include
Extended parser to support inclusion of .ks files: recursively called self._parse to parse included .ks Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/ksparser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 0191a8474e..c73a456766 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -116,6 +116,9 @@ class KickStart(object):
bootloader.add_argument('--timeout', type=int)
bootloader.add_argument('--source')
+ include = subparsers.add_parser('include')
+ include.add_argument('path')
+
self._parse(parser, confpath)
def _parse(self, parser, confpath):
@@ -133,7 +136,9 @@ class KickStart(object):
if line.startswith('part'):
self.partnum += 1
self.partitions.append(Partition(parsed, self.partnum))
- else:
+ elif line.startswith('include'):
+ self._parse(parser, parsed.path)
+ elif line.startswith('bootloader'):
if not self.bootloader:
self.bootloader = parsed
else: