image: use du --apparent-size when calculating rootfs size
PATCH 1/1 image: use du --apparent-size when calculating rootfs size
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.
--- meta/classes/image.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/image.bbclass +1 -0
@@ -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])
Signature · 1 line
2.11.0
Quoted 15 lines · Ross Burton
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 <[email protected]>--- meta/classes/image.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/image.bbclass +0
-0
meta/classes/image.bbclass def get_rootfs_size(d): · line 539
Quoted 6 lines
meta/classes/image.bbclass +1
-0@@ -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
Quoted 15 lines · Alexander Kanavin
Quoted 13 lines · Ross Burton
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 <[email protected]>--- meta/classes/image.bbclass | 1 + 1 file changed, 1 insertion(+)
Quoted 14 lines
meta/classes/image.bbclass def get_rootfs_size(d): · line 539
Quoted 11 lines
meta/classes/image.bbclass +1
-0@@ -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
Quoted 6 lines · Ross
Exactly same patch from Maxin caused failures previously, no?
Quoted 1 line
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
Quoted 4 lines · Ross
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