[OE-core] [PATCH 2/2] image.bbclass: improve reproducibility

Maxin B. John maxin.john at intel.com
Thu Nov 16 15:56:07 UTC 2017


Improve reproducibility of builds by adding --apparent-size to du -ks in
get_rootfs_size

[YOCTO #12235]

Signed-off-by: Maxin B. John <maxin.john at intel.com>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 0d14250..a24a561 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -524,7 +524,7 @@ def get_rootfs_size(d):
     initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES') or ''
     initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE')
 
-    output = subprocess.check_output(['du', '-ks',
+    output = subprocess.check_output(['du', '--apparent-size', '-ks',
                                       d.getVar('IMAGE_ROOTFS')])
     size_kb = int(output.split()[0])
     base_size = size_kb * overhead_factor
-- 
2.4.0




More information about the Openembedded-core mailing list