* [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
* Re: [PATCH] image: use du --apparent-size when calculating rootfs size
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
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2018-01-11 15:29 UTC (permalink / raw)
To: Ross Burton, openembedded-core
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@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?
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image: use du --apparent-size when calculating rootfs size
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
0 siblings, 2 replies; 5+ messages in thread
From: Burton, Ross @ 2018-01-11 15:42 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
On 11 January 2018 at 15:29, Alexander Kanavin <
alexander.kanavin@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@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
[-- Attachment #2: Type: text/html, Size: 2016 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image: use du --apparent-size when calculating rootfs size
2018-01-11 15:42 ` Burton, Ross
@ 2018-01-11 15:43 ` Burton, Ross
2018-01-11 15:45 ` Alexander Kanavin
1 sibling, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2018-01-11 15:43 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
On 11 January 2018 at 15:42, Burton, Ross <ross.burton@intel.com> wrote:
> 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
>
Found it, bad search. Lets see what happens on the AB this time...
Ross
[-- Attachment #2: Type: text/html, Size: 950 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image: use du --apparent-size when calculating rootfs size
2018-01-11 15:42 ` Burton, Ross
2018-01-11 15:43 ` Burton, Ross
@ 2018-01-11 15:45 ` Alexander Kanavin
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Kanavin @ 2018-01-11 15:45 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 01/11/2018 05:42 PM, Burton, Ross wrote:
> 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.
http://lists.openembedded.org/pipermail/openembedded-core/2017-November/144748.html
You're welcome :)
Alex
^ permalink raw reply [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.