== 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 'du' 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.
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's os.lstat(), which is already bytes.
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 ?
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 "du" and instead use the sum of lstat() on each file.