mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
wic: ksparser: add support for include
Extended parser to support inclusion of .ks files:
recursively called self._parse to parse included .ks
(From OE-Core rev: 33dd323ec6a1a1ed4e1a04e51de182c89c7b6bd9)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3fc6aaa186
commit
d304162269
@@ -116,6 +116,9 @@ class KickStart(object):
|
|||||||
bootloader.add_argument('--timeout', type=int)
|
bootloader.add_argument('--timeout', type=int)
|
||||||
bootloader.add_argument('--source')
|
bootloader.add_argument('--source')
|
||||||
|
|
||||||
|
include = subparsers.add_parser('include')
|
||||||
|
include.add_argument('path')
|
||||||
|
|
||||||
self._parse(parser, confpath)
|
self._parse(parser, confpath)
|
||||||
|
|
||||||
def _parse(self, parser, confpath):
|
def _parse(self, parser, confpath):
|
||||||
@@ -133,7 +136,9 @@ class KickStart(object):
|
|||||||
if line.startswith('part'):
|
if line.startswith('part'):
|
||||||
self.partnum += 1
|
self.partnum += 1
|
||||||
self.partitions.append(Partition(parsed, self.partnum))
|
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:
|
if not self.bootloader:
|
||||||
self.bootloader = parsed
|
self.bootloader = parsed
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user