aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/imager/direct.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-14 14:12:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-17 11:32:19 +0000
commitb46da0731e3f7016d0ab2a67967f07c7e199f219 (patch)
treee4ffe35d338e1eb9d879c748e7db1ba1aa42d2eb /scripts/lib/wic/imager/direct.py
parent30bb1f3b6b832f9be691350581458c5fdaaaad70 (diff)
downloadopenembedded-core-contrib-b46da0731e3f7016d0ab2a67967f07c7e199f219.tar.gz
wic: adjust code for new data structure
New data structure is less nested than old one. Adjusted bootloader and partitions fields: self.ks.handler.bootloader -> self.ks.bootoader self.ks.handler.partitions -> self.ks.partitions 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/imager/direct.py')
-rw-r--r--scripts/lib/wic/imager/direct.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index f89c42cfb7..25bab89169 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -64,7 +64,7 @@ class DirectImageCreator(BaseImageCreator):
self.__disks = {}
self.__disk_format = "direct"
self._disk_names = []
- self.ptable_format = self.ks.handler.bootloader.ptable
+ self.ptable_format = self.ks.bootloader.ptable
self.oe_builddir = oe_builddir
if image_output_dir:
@@ -151,12 +151,12 @@ class DirectImageCreator(BaseImageCreator):
"please check your kickstart setting.")
# Set a default partition if no partition is given out
- if not self.ks.handler.partition.partitions:
+ if not self.ks.partitions:
partstr = "part / --size 1900 --ondisk sda --fstype=ext3"
args = partstr.split()
- part = self.ks.handler.partition.parse(args[1:])
- if part not in self.ks.handler.partition.partitions:
- self.ks.handler.partition.partitions.append(part)
+ part = self.ks.parse(args[1:])
+ if part not in self.ks.partitions:
+ self.ks.partitions.append(part)
# partitions list from kickstart file
return kickstart.get_partitions(self.ks)
@@ -206,7 +206,7 @@ class DirectImageCreator(BaseImageCreator):
bootloader object, the default can be explicitly set using the
--source bootloader param.
"""
- return self.ks.handler.bootloader.source
+ return self.ks.bootloader.source
#
# Actual implemention
@@ -224,8 +224,8 @@ class DirectImageCreator(BaseImageCreator):
for part in parts:
# as a convenience, set source to the boot partition source
# instead of forcing it to be set via bootloader --source
- if not self.ks.handler.bootloader.source and part.mountpoint == "/boot":
- self.ks.handler.bootloader.source = part.source
+ if not self.ks.bootloader.source and part.mountpoint == "/boot":
+ self.ks.bootloader.source = part.source
fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))