All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image: use du --apparent-size when calculating rootfs size
@ 2018-01-11 15:18 Ross Burton
  2018-01-11 15:29 ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2018-01-11 15:18 UTC (permalink / raw)
  To: openembedded-core

We should pass --apparent-size to du when calculating how large the rootfs is as
otherwise we get the actual disk usage, which if the files are compressed by the
file system (such as ZFS) may be sufficiently smaller than the space required by
the image that construction will fail.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/image.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4531aa2a57a..8e763e4d543 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -534,6 +534,7 @@ def get_rootfs_size(d):
     initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE')
 
     output = subprocess.check_output(['du', '-ks',
+                                      '--apparent-size',
                                       d.getVar('IMAGE_ROOTFS')])
     size_kb = int(output.split()[0])
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-11 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11 15:18 [PATCH] image: use du --apparent-size when calculating rootfs size Ross Burton
2018-01-11 15:29 ` Alexander Kanavin
2018-01-11 15:42   ` Burton, Ross
2018-01-11 15:43     ` Burton, Ross
2018-01-11 15:45     ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.