summaryrefslogtreecommitdiff
path: root/scripts
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-19 21:30:37 +0000
commitcc2233b51f1d22d4e540f4a3e9ceedd7ede9ffa9 (patch)
treeaf82d900e232242389266c24694402b1b5cf51a6 /scripts
parent7778b9851758f4f782cb5f5d5fb36e68aed3b275 (diff)
downloadopenembedded-core-cc2233b51f1d22d4e540f4a3e9ceedd7ede9ffa9.tar.gz
openembedded-core-cc2233b51f1d22d4e540f4a3e9ceedd7ede9ffa9.tar.bz2
openembedded-core-cc2233b51f1d22d4e540f4a3e9ceedd7ede9ffa9.zip
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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):
self.partitions = []
self.bootloader = None
self.lineno = 0
+ self.partnum = 0
parser = KickStartParser()
subparsers = parser.add_subparsers()
@@ -130,7 +131,8 @@ class KickStart(object):
raise KickStartError('%s:%d: %s' % \
(confpath, lineno, err))
if line.startswith('part'):
- self.partitions.append(Partition(parsed, lineno))
+ self.partnum += 1
+ self.partitions.append(Partition(parsed, self.partnum))
else:
if not self.bootloader:
self.bootloader = parsed