summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-14 14:12:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-18 11:47:06 +0000
commit2573e285d01106deaedea648f7c7566020721be7 (patch)
treeaf1c23f9d7f87c1fda450d32402a2690e30be6c6 /scripts/lib/wic
parent5cd222b19f1a937ecc10de5db04d954d3c11eff5 (diff)
downloadpoky-2573e285d01106deaedea648f7c7566020721be7.tar.gz
wic: get rid of set_size and set_source_file setters
Used size and source_file attributes instead of using setters. It's more pythonic, clear an consistent. (From OE-Core rev: 7cf236047fa5d0d947fd214181c9a63ccb2509ac) 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/plugins/source/bootimg-efi.py4
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py4
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 35afa30ea6..8bfa3a96ce 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -235,5 +235,5 @@ class BootimgEFIPlugin(SourcePlugin):
235 out = exec_cmd(du_cmd) 235 out = exec_cmd(du_cmd)
236 bootimg_size = out.split()[0] 236 bootimg_size = out.split()[0]
237 237
238 part.set_size(bootimg_size) 238 part.size = bootimg_size
239 part.set_source_file(bootimg) 239 part.source_file = bootimg
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 255684b386..e84bddf15d 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -205,7 +205,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
205 out = exec_cmd(du_cmd) 205 out = exec_cmd(du_cmd)
206 bootimg_size = out.split()[0] 206 bootimg_size = out.split()[0]
207 207
208 part.set_size(bootimg_size) 208 part.size = int(out.split()[0])
209 part.set_source_file(bootimg) 209 part.source_file = bootimg
210 210
211 211
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index b5ca4d39f6..daefff3927 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -302,7 +302,7 @@ class IsoImagePlugin(SourcePlugin):
302 # which contains rootfs 302 # which contains rootfs
303 du_cmd = "du -bks %s" % rootfs_dir 303 du_cmd = "du -bks %s" % rootfs_dir
304 out = exec_cmd(du_cmd) 304 out = exec_cmd(du_cmd)
305 part.set_size(int(out.split()[0])) 305 part.size = int(out.split()[0])
306 part.extra_space = 0 306 part.extra_space = 0
307 part.overhead_factor = 1.2 307 part.overhead_factor = 1.2
308 part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \ 308 part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \
@@ -502,8 +502,8 @@ class IsoImagePlugin(SourcePlugin):
502 out = exec_cmd(du_cmd) 502 out = exec_cmd(du_cmd)
503 isoimg_size = int(out.split()[0]) 503 isoimg_size = int(out.split()[0])
504 504
505 part.set_size(isoimg_size) 505 part.size = isoimg_size
506 part.set_source_file(iso_img) 506 part.source_file = iso_img
507 507
508 @classmethod 508 @classmethod
509 def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, 509 def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,