<?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>5334</bug_id>
          
          <creation_ts>2013-10-10 11:13:50 +0000</creation_ts>
          <short_desc>PKGSIZE is reported relative to host disk space</short_desc>
          <delta_ts>2013-12-03 17:55:51 +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>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Damian">alexandru.damian</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>dvhart</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>37801</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-10-10 11:13:50 +0000</bug_when>
    <thetext>== Situation ==
Getting the package size from package.bbclass yields an incorrect value.

== Current behaviour ==
PKGSIZE is a variable holding the size of a package build by package.bbclass.
Currently, the size is computed by counting the disk space taken by files on the host system, using a &apos;du&apos; command. This size comes back as Kilobytes, and is a multiple of the host fs block allocation size.

== Expected output == 
When computing the size of a package, I would expect to see the size equal to sum of the files that are packaged in the said package, possibly plus space taken by metadata. The size should be in Bytes as to accurately reflect minimum space taken on target.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38158</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-10-24 20:49:59 +0000</bug_when>
    <thetext>I think you are refering to IMAGESIZE which uses du -k, This could also invalid 
existing data contained in the history. PGKSIZE is using pyhton&apos;s os.lstat(), 
which is already bytes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38174</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-10-25 10:08:10 +0000</bug_when>
    <thetext>This is about PKGSIZE in package.bbclass, which uses 
def get_directory_size()

which executes `du -sk `.

Maybe this should be a more general bug for usage of `du` in host context ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39212</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-03 17:55:51 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f4e91404f8722b4fb1700e4c9fe13f0dfd7ebda3
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f4e91404f8722b4fb1700e4c9fe13f0dfd7ebda3

The fix was to drop use of &quot;du&quot; and instead use the sum of lstat() on each file.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>