diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-14 14:12:55 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-18 11:47:05 +0000 |
commit | 26fb2a1a45049fd5731ae83efb962a84afb14568 (patch) | |
tree | 13f27e849210b55e1b540c902da63cb325bfb574 /scripts/lib/wic/imager/direct.py | |
parent | c8272380ceed8dd56237995eecbaca5f4c9645dd (diff) | |
download | poky-26fb2a1a45049fd5731ae83efb962a84afb14568.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
(From OE-Core rev: b46da0731e3f7016d0ab2a67967f07c7e199f219)
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.py | 16 |
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): | |||
64 | self.__disks = {} | 64 | self.__disks = {} |
65 | self.__disk_format = "direct" | 65 | self.__disk_format = "direct" |
66 | self._disk_names = [] | 66 | self._disk_names = [] |
67 | self.ptable_format = self.ks.handler.bootloader.ptable | 67 | self.ptable_format = self.ks.bootloader.ptable |
68 | 68 | ||
69 | self.oe_builddir = oe_builddir | 69 | self.oe_builddir = oe_builddir |
70 | if image_output_dir: | 70 | if image_output_dir: |
@@ -151,12 +151,12 @@ class DirectImageCreator(BaseImageCreator): | |||
151 | "please check your kickstart setting.") | 151 | "please check your kickstart setting.") |
152 | 152 | ||
153 | # Set a default partition if no partition is given out | 153 | # Set a default partition if no partition is given out |
154 | if not self.ks.handler.partition.partitions: | 154 | if not self.ks.partitions: |
155 | partstr = "part / --size 1900 --ondisk sda --fstype=ext3" | 155 | partstr = "part / --size 1900 --ondisk sda --fstype=ext3" |
156 | args = partstr.split() | 156 | args = partstr.split() |
157 | part = self.ks.handler.partition.parse(args[1:]) | 157 | part = self.ks.parse(args[1:]) |
158 | if part not in self.ks.handler.partition.partitions: | 158 | if part not in self.ks.partitions: |
159 | self.ks.handler.partition.partitions.append(part) | 159 | self.ks.partitions.append(part) |
160 | 160 | ||
161 | # partitions list from kickstart file | 161 | # partitions list from kickstart file |
162 | return kickstart.get_partitions(self.ks) | 162 | return kickstart.get_partitions(self.ks) |
@@ -206,7 +206,7 @@ class DirectImageCreator(BaseImageCreator): | |||
206 | bootloader object, the default can be explicitly set using the | 206 | bootloader object, the default can be explicitly set using the |
207 | --source bootloader param. | 207 | --source bootloader param. |
208 | """ | 208 | """ |
209 | return self.ks.handler.bootloader.source | 209 | return self.ks.bootloader.source |
210 | 210 | ||
211 | # | 211 | # |
212 | # Actual implemention | 212 | # Actual implemention |
@@ -224,8 +224,8 @@ class DirectImageCreator(BaseImageCreator): | |||
224 | for part in parts: | 224 | for part in parts: |
225 | # as a convenience, set source to the boot partition source | 225 | # as a convenience, set source to the boot partition source |
226 | # instead of forcing it to be set via bootloader --source | 226 | # instead of forcing it to be set via bootloader --source |
227 | if not self.ks.handler.bootloader.source and part.mountpoint == "/boot": | 227 | if not self.ks.bootloader.source and part.mountpoint == "/boot": |
228 | self.ks.handler.bootloader.source = part.source | 228 | self.ks.bootloader.source = part.source |
229 | 229 | ||
230 | fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | 230 | fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) |
231 | 231 | ||