<?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>12235</bug_id>
          
          <creation_ts>2017-10-18 12:43:16 +0000</creation_ts>
          <short_desc>image.bbclass: Consider adding --apparent-size to du -ks for get_rootfs_size</short_desc>
          <delta_ts>2018-01-11 15:54:40 +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>5.99</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>8430</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Liu">net147</reporter>
          <assigned_to name="Maxin B. John">maxin.john</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>77656</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Liu">net147</who>
    <bug_when>2017-10-18 12:43:16 +0000</bug_when>
    <thetext>Consider changing du -ks to du --apparent-size -ks for more reproducible builds. I get slightly different results running du -ks on a btrfs filesystem with compress-force=lzo compared to an ext4 filesystem.

btrfs:
$ wget http://www.tpg.com.au/test3.iso
$ du --apparent-size -ks test3.iso
51102   test3.iso
$ du -ks test3.iso
51104   test3.iso

ext4:
$ wget http://www.tpg.com.au/test3.iso
$ du --apparent-size -ks test3.iso
51102   test3.iso
$ du -ks test3.iso
51108   test3.iso</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77704</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-19 14:44:55 +0000</bug_when>
    <thetext>As we&apos;re getting the size of a single file, we could just use stat() right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77718</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Liu">net147</who>
    <bug_when>2017-10-19 22:14:53 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; As we&apos;re getting the size of a single file, we could just use stat() right?

It is calculating size for a directory not a single file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77723</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-20 07:50:45 +0000</bug_when>
    <thetext>Yes, sorry, I was thinking of the wrong variable.

Note that you&apos;ll still get differences with --apparent-size thanks to the directory inodes being of variable size.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78287</commentid>
    <comment_count>4</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2017-11-20 12:51:26 +0000</bug_when>
    <thetext>http://lists.openembedded.org/pipermail/openembedded-core/2017-November/144538.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79030</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-01-11 15:54:40 +0000</bug_when>
    <thetext>Duplicate so marking as such.

*** This bug has been marked as a duplicate of bug 8430 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>