diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-07-31 13:55:24 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-11 10:52:14 +0100 |
commit | a10bbd39eee29cc49d258bf08aaec279c3115c66 (patch) | |
tree | 8b21d530659ab6672bab3a630c2a8b59d2836ef1 /scripts/lib/mic/plugins/source | |
parent | 3ae32d0d6c7cf8294300f32d346da36748e05f3d (diff) | |
download | openembedded-core-a10bbd39eee29cc49d258bf08aaec279c3115c66.tar.gz openembedded-core-a10bbd39eee29cc49d258bf08aaec279c3115c66.tar.bz2 openembedded-core-a10bbd39eee29cc49d258bf08aaec279c3115c66.zip |
wic: Make exec_cmd() error out instead of warn
The reason exec_cmd() warns but doesn't error out (broken parted)
doesn't really make sense, since the parted invocations don't even use
exec_cmd(). It really should just fail since by not doing so it's
actually enabling invalid images in some cases.
Also, since the return code is now always zero, there's no point in
having a return code, so remove it. This represents a change in the
API, so we also need to update all callers.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'scripts/lib/mic/plugins/source')
-rw-r--r-- | scripts/lib/mic/plugins/source/bootimg-efi.py | 8 | ||||
-rw-r--r-- | scripts/lib/mic/plugins/source/bootimg-pcbios.py | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py b/scripts/lib/mic/plugins/source/bootimg-efi.py index 0dd9152b59..aecda6b0f1 100644 --- a/scripts/lib/mic/plugins/source/bootimg-efi.py +++ b/scripts/lib/mic/plugins/source/bootimg-efi.py @@ -53,7 +53,7 @@ class BootimgEFIPlugin(SourcePlugin): exec_cmd(rm_cmd) install_cmd = "install -d %s/EFI/BOOT" % hdddir - tmp = exec_cmd(install_cmd) + exec_cmd(install_cmd) splash = os.path.join(cr_workdir, "/EFI/boot/splash.jpg") if os.path.exists(splash): @@ -116,7 +116,7 @@ class BootimgEFIPlugin(SourcePlugin): install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ (staging_kernel_dir, hdddir) - tmp = exec_cmd(install_cmd) + exec_cmd(install_cmd) shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, "%s/grub.cfg" % cr_workdir) @@ -128,7 +128,7 @@ class BootimgEFIPlugin(SourcePlugin): "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir) du_cmd = "du -bks %s" % hdddir - rc, out = exec_cmd(du_cmd) + out = exec_cmd(du_cmd) blocks = int(out.split()[0]) extra_blocks = part.get_extra_block_count(blocks) @@ -160,7 +160,7 @@ class BootimgEFIPlugin(SourcePlugin): exec_cmd(chmod_cmd) du_cmd = "du -Lbms %s" % bootimg - rc, out = exec_cmd(du_cmd) + out = exec_cmd(du_cmd) bootimg_size = out.split()[0] part.set_size(bootimg_size) diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py b/scripts/lib/mic/plugins/source/bootimg-pcbios.py index 1211e5c93b..6488ae9729 100644 --- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py @@ -78,7 +78,7 @@ class BootimgPcbiosPlugin(SourcePlugin): exec_cmd(rm_cmd) install_cmd = "install -d %s" % hdddir - tmp = exec_cmd(install_cmd) + exec_cmd(install_cmd) splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg") if os.path.exists(splash): @@ -144,14 +144,14 @@ class BootimgPcbiosPlugin(SourcePlugin): install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \ % (staging_kernel_dir, hdddir) - tmp = exec_cmd(install_cmd) + exec_cmd(install_cmd) install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \ % (staging_data_dir, hdddir) - tmp = exec_cmd(install_cmd) + exec_cmd(install_cmd) du_cmd = "du -bks %s" % hdddir - rc, out = exec_cmd(du_cmd) + out = exec_cmd(du_cmd) blocks = int(out.split()[0]) extra_blocks = part.get_extra_block_count(blocks) @@ -186,7 +186,7 @@ class BootimgPcbiosPlugin(SourcePlugin): exec_cmd(chmod_cmd) du_cmd = "du -Lbms %s" % bootimg - rc, out = exec_cmd(du_cmd) + out = exec_cmd(du_cmd) bootimg_size = out.split()[0] part.set_size(bootimg_size) |