From 2697d3984f8144ab001ed70ca713a10f6d1d83be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 17 Sep 2021 14:59:20 +0200 Subject: wic: keep rootfs_size as integer The corrected line accidentally converted it to float, which causes problems later on with python 3.10: | File "/home/alex/development/poky/scripts/lib/wic/partition.py", line 278, in prepare_rootfs_ext | os.ftruncate(sparse.fileno(), rootfs_size * 1024) | TypeError: 'float' object cannot be interpreted as an integer (From OE-Core rev: d1d260dd2d196d10379ed9e238bcb34f39f3a3b7) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- scripts/lib/wic/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index ab304f1b2a..a25834048e 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -105,7 +105,7 @@ class Partition(): extra_blocks = self.extra_space rootfs_size = actual_rootfs_size + extra_blocks - rootfs_size *= self.overhead_factor + rootfs_size = int(rootfs_size * self.overhead_factor) logger.debug("Added %d extra blocks to %s to get to %d total blocks", extra_blocks, self.mountpoint, rootfs_size) -- cgit v1.2.3-54-g00ecf