[OE-core] [PATCH] image: use du --apparent-size when calculating rootfs size

Burton, Ross ross.burton at intel.com
Thu Jan 11 15:42:09 UTC 2018


On 11 January 2018 at 15:29, Alexander Kanavin <
alexander.kanavin at linux.intel.com> wrote:

> On 01/11/2018 05:18 PM, Ross Burton wrote:
>
>> 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 at 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])
>>
>
> Exactly same patch from Maxin caused failures previously, no?
>

Hm, I knew I remembered seeing this before, and found my patches from 2015,
but didn't see the ones from Maxin.  I'll dig the archives again.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180111/2a0e2003/attachment-0002.html>


More information about the Openembedded-core mailing list