summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-17 14:59:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-19 11:33:14 +0100
commit2697d3984f8144ab001ed70ca713a10f6d1d83be (patch)
treede4443503e0a03c45526158e38357e7bae60786e /scripts/lib
parent5128defbc3996af5f8e28f5681ba4ad5b3c5d023 (diff)
downloadpoky-2697d3984f8144ab001ed70ca713a10f6d1d83be.tar.gz
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 <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/partition.py2
1 files changed, 1 insertions, 1 deletions
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():
105 extra_blocks = self.extra_space 105 extra_blocks = self.extra_space
106 106
107 rootfs_size = actual_rootfs_size + extra_blocks 107 rootfs_size = actual_rootfs_size + extra_blocks
108 rootfs_size *= self.overhead_factor 108 rootfs_size = int(rootfs_size * self.overhead_factor)
109 109
110 logger.debug("Added %d extra blocks to %s to get to %d total blocks", 110 logger.debug("Added %d extra blocks to %s to get to %d total blocks",
111 extra_blocks, self.mountpoint, rootfs_size) 111 extra_blocks, self.mountpoint, rootfs_size)