[OE-core] [PATCH] oe/image: use apparent size of artifacts, not disk usage

Ross Burton ross.burton at intel.com
Thu Oct 8 16:02:05 UTC 2015


When collecting the size of the root file system get the apparent size of the
files not the actual disk usage, as disk usage on the host file system can be
affected by file system compression or sparse files.

[ YOCTO #8430 ]

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oe/image.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index b0d81a6..9199e36 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -164,6 +164,7 @@ class Image(ImageDepGraph):
         rootfs_maxsize = self.d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
 
         output = subprocess.check_output(['du', '-ks',
+                                          '--apparent-size',
                                           self.d.getVar('IMAGE_ROOTFS', True)])
         size_kb = int(output.split()[0])
         base_size = size_kb * overhead_factor
-- 
2.1.4




More information about the Openembedded-core mailing list