From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] image: use du --apparent-size when calculating rootfs size
Date: Thu, 11 Jan 2018 15:18:34 +0000 [thread overview]
Message-ID: <20180111151834.4169-1-ross.burton@intel.com> (raw)
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
next reply other threads:[~2018-01-11 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 15:18 Ross Burton [this message]
2018-01-11 15:29 ` [PATCH] image: use du --apparent-size when calculating rootfs size Alexander Kanavin
2018-01-11 15:42 ` Burton, Ross
2018-01-11 15:43 ` Burton, Ross
2018-01-11 15:45 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180111151834.4169-1-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox