summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-17 14:59:20 +0200
committerSteve Sakoman <steve@sakoman.com>2021-09-24 04:27:46 -1000
commit098195ecefafa4082bb5d27ff1c8b1b7b8e222d5 (patch)
tree25fe270fc91783769be49141af99b3c740187cac
parent4b4131f28dd4d0f61d92d0c0bb0e058a755f65b6 (diff)
downloadopenembedded-core-098195ecefafa4082bb5d27ff1c8b1b7b8e222d5.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 Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d1d260dd2d196d10379ed9e238bcb34f39f3a3b7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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 85f9847047..792bb3dcd3 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -104,7 +104,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)