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

[YOCTO #12235]

Signed-off-by: Maxin B. John <maxin.j...@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

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to