diff options
Diffstat (limited to 'scripts/lib/wic/utils')
-rw-r--r-- | scripts/lib/wic/utils/oe/misc.py | 6 | ||||
-rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 12 |
2 files changed, 7 insertions, 11 deletions
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 9eaf039f95..f08ff15a34 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py @@ -86,6 +86,12 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3): msger.error("A native program %s required to build the image " "was not found (see details above). Please make sure " "it's installed and try again." % args[0]) + if out: + msger.debug('"%s" output: %s' % (args[0], out)) + + if rc != 0: + msger.error("exec_cmd: '%s' returned '%s' instead of 0" % \ + (cmd_and_args, rc)) return (rc, out) diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index eacf2679d2..8fd44a6a96 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -227,17 +227,7 @@ class Image: args = ' '.join(args) msger.debug(args) - rc, out = exec_native_cmd(args, self.native_sysroot) - - if out: - msger.debug('"parted" output: %s' % out) - - if rc != 0: - # We don't throw exception when return code is not 0, because - # parted always fails to reload part table with loop devices. This - # prevents us from distinguishing real errors based on return - # code. - msger.error("WARNING: parted returned '%s' instead of 0 (use --debug for details)" % rc) + exec_native_cmd(args, self.native_sysroot) def __create_partition(self, device, parttype, fstype, start, size): """ Create a partition on an image described by the 'device' object. """ |