<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5837</bug_id>
          
          <creation_ts>2014-02-18 04:47:21 +0000</creation_ts>
          <short_desc>Image creation command failure not detected</short_desc>
          <delta_ts>2014-02-19 13:09:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Liu">net147</reporter>
          <assigned_to name="Laurentiu Palcu">laurentiu.palcu</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>40401</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Liu">net147</who>
    <bug_when>2014-02-18 04:47:21 +0000</bug_when>
    <thetext>If any of the image creation commands fail, this does not result in a bitbake error. Before the switch to the new Python rootfs/image creation routines, if any of the image creation commands fail it would result in a bitbake error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40418</commentid>
    <comment_count>1</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2014-02-18 13:54:27 +0000</bug_when>
    <thetext>If any of the image creation scripts fail (exit code other than 0), the build is halted.

Unless you provide a provide a lot more details in the bug description, I&apos;m closing this as invalid. Feel free to re-open after you provide a procedure to reproduce, commit you tested with, etc. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40419</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Liu">net147</who>
    <bug_when>2014-02-18 13:58:44 +0000</bug_when>
    <thetext>It may check the the exit code of the script fails but the exit code of the script is the exit code of the last command executed.

If a command other than the last one fails, it just continues running so I am thinking it needs something like &quot;set -e&quot; at the start of the script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40427</commentid>
    <comment_count>3</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2014-02-18 15:54:21 +0000</bug_when>
    <thetext>All the image creation scripts have &quot;set -e&quot; at the start... So, in theory, any failed pipeline/command should exit. But, I&apos;m suspecting the trap code here which is executed in case any command fails... I&apos;ll re-open this and give it another look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40452</commentid>
    <comment_count>4</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2014-02-19 13:09:55 +0000</bug_when>
    <thetext>Hi Jonathan,

I did a test today with latest master. In oe_mkext234fs(), from image_types.bbclass, I replaced

  dd if=/dev/zero of=...
to
  dd if=/dev/nothing of=...

and did a bitbake core-image-minimal. The build failed with:

ERROR: Error: The image creation script &apos;/ssd/work/yp2/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/create_image.ext3&apos; returned 1:
WARNING: /ssd/work/yp2/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/create_image.ext3:1 exit 1 from
  dd if=/dev/nothing of=/ssd/work/yp2/build/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20140219130439.rootfs.$fstype seek=$ROOTFS_SIZE count=0 bs=1k

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /ssd/work/yp2/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.7021
ERROR: Task 6 (/ssd/work/yp2/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 1401 tasks of which 1400 didn&apos;t need to be rerun and 1 failed.

The behavior is the expected one. &apos;dd&apos; command is not the last in the script... So, again, I&apos;ll close this issue as INVALID. Re-open it after you provide a valid scenario to reproduce it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>