diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-05 09:13:07 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-11 23:55:38 +0100 |
commit | 9e3e933321d58c04619a585326fb291dbf2748f5 (patch) | |
tree | 9446f4c8910388e362e6a5e7c5aa8122e642e879 /scripts/lib/wic/kickstart | |
parent | 7467fd446d08704881325577b7035b6128db6151 (diff) | |
download | openembedded-core-9e3e933321d58c04619a585326fb291dbf2748f5.tar.gz openembedded-core-9e3e933321d58c04619a585326fb291dbf2748f5.tar.bz2 openembedded-core-9e3e933321d58c04619a585326fb291dbf2748f5.zip |
wic: move checks to exec_native_cmd
Checked for return code and output of native commands
inside exec_native_cmd.
Removed similar code from a lot of places where
exec_native_cmd is called.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/wic/kickstart')
-rw-r--r-- | scripts/lib/wic/kickstart/custom_commands/partition.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index d9f77d9a28..5d033bb562 100644 --- a/scripts/lib/wic/kickstart/custom_commands/partition.py +++ b/scripts/lib/wic/kickstart/custom_commands/partition.py @@ -257,10 +257,7 @@ class Wic_PartData(Mic_PartData): mkfs_cmd = "mkfs.%s -F %s %s %s -d %s" % \ (self.fstype, extra_imagecmd, rootfs, label_str, image_rootfs) - (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) - if rc: - print "rootfs_dir: %s" % rootfs_dir - msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir)) + exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) # get the rootfs size in the right units for kickstart (kB) du_cmd = "du -Lbks %s" % rootfs @@ -307,9 +304,7 @@ class Wic_PartData(Mic_PartData): mkfs_cmd = "mkfs.%s -b %d -r %s %s %s" % \ (self.fstype, rootfs_size * 1024, image_rootfs, label_str, rootfs) - (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) - if rc: - msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir)) + exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) # get the rootfs size in the right units for kickstart (kB) du_cmd = "du -Lbks %s" % rootfs @@ -357,9 +352,7 @@ class Wic_PartData(Mic_PartData): exec_native_cmd(dosfs_cmd, native_sysroot) mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, image_rootfs) - rc, out = exec_native_cmd(mcopy_cmd, native_sysroot) - if rc: - msger.error("ERROR: mcopy returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % rc) + exec_native_cmd(mcopy_cmd, native_sysroot) chmod_cmd = "chmod 644 %s" % rootfs exec_cmd(chmod_cmd) @@ -432,9 +425,7 @@ class Wic_PartData(Mic_PartData): mkfs_cmd = "mkfs.%s -F %s %s %s" % \ (self.fstype, extra_imagecmd, label_str, fs) - (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot) - if rc: - msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc)) + exec_native_cmd(mkfs_cmd, native_sysroot) self.source_file = fs @@ -458,9 +449,7 @@ class Wic_PartData(Mic_PartData): mkfs_cmd = "mkfs.%s -b %d %s %s" % \ (self.fstype, self.size * 1024, label_str, fs) - (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot) - if rc: - msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc)) + exec_native_cmd(mkfs_cmd, native_sysroot) self.source_file = fs |