diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-19 18:51:06 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-20 17:07:13 +0000 |
commit | d304162269ccc93767439b3e80b57f6d33f8d9bc (patch) | |
tree | 7ea753c98bd46e52052628c0f4198c262cf56e0a /scripts/lib/wic | |
parent | 3fc6aaa1862a735322264049dcb50c69acf30d36 (diff) | |
download | poky-d304162269ccc93767439b3e80b57f6d33f8d9bc.tar.gz |
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>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/ksparser.py | 7 |
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): | |||
116 | bootloader.add_argument('--timeout', type=int) | 116 | bootloader.add_argument('--timeout', type=int) |
117 | bootloader.add_argument('--source') | 117 | bootloader.add_argument('--source') |
118 | 118 | ||
119 | include = subparsers.add_parser('include') | ||
120 | include.add_argument('path') | ||
121 | |||
119 | self._parse(parser, confpath) | 122 | self._parse(parser, confpath) |
120 | 123 | ||
121 | def _parse(self, parser, confpath): | 124 | def _parse(self, parser, confpath): |
@@ -133,7 +136,9 @@ class KickStart(object): | |||
133 | if line.startswith('part'): | 136 | if line.startswith('part'): |
134 | self.partnum += 1 | 137 | self.partnum += 1 |
135 | self.partitions.append(Partition(parsed, self.partnum)) | 138 | self.partitions.append(Partition(parsed, self.partnum)) |
136 | else: | 139 | elif line.startswith('include'): |
140 | self._parse(parser, parsed.path) | ||
141 | elif line.startswith('bootloader'): | ||
137 | if not self.bootloader: | 142 | if not self.bootloader: |
138 | self.bootloader = parsed | 143 | self.bootloader = parsed |
139 | else: | 144 | else: |