summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-19 18:51:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-20 17:07:13 +0000
commit8d34eea303f1a8bbfeb01252330b0f6dfd92bbf7 (patch)
treee3bdce4ab5732b625daaed28f73e6cf43e7bb1c8 /scripts/lib/wic
parent43b4058508980d2c46bbcf591d35afdaf92adb7a (diff)
downloadpoky-8d34eea303f1a8bbfeb01252330b0f6dfd92bbf7.tar.gz
wic: use unique partition number
This is a preparation for 'include' support. Used unique counter instead of line number for partitions in .ks file. Line numbers can be equal for different .ks files, which can cause problems if one .ks file is included into another. (From OE-Core rev: cc2233b51f1d22d4e540f4a3e9ceedd7ede9ffa9) 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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index e366f61e0f..0191a8474e 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -84,6 +84,7 @@ class KickStart(object):
84 self.partitions = [] 84 self.partitions = []
85 self.bootloader = None 85 self.bootloader = None
86 self.lineno = 0 86 self.lineno = 0
87 self.partnum = 0
87 88
88 parser = KickStartParser() 89 parser = KickStartParser()
89 subparsers = parser.add_subparsers() 90 subparsers = parser.add_subparsers()
@@ -130,7 +131,8 @@ class KickStart(object):
130 raise KickStartError('%s:%d: %s' % \ 131 raise KickStartError('%s:%d: %s' % \
131 (confpath, lineno, err)) 132 (confpath, lineno, err))
132 if line.startswith('part'): 133 if line.startswith('part'):
133 self.partitions.append(Partition(parsed, lineno)) 134 self.partnum += 1
135 self.partitions.append(Partition(parsed, self.partnum))
134 else: 136 else:
135 if not self.bootloader: 137 if not self.bootloader:
136 self.bootloader = parsed 138 self.bootloader = parsed