[OE-core] [PATCH] image.py: make sure ROOTFS_SIZE is an integer
Jonathan Liu
net147 at gmail.com
Thu Sep 17 03:55:31 UTC 2015
_get_rootfs_size was returning a float in some cases (e.g. 12288.0).
Signed-off-by: Jonathan Liu <net147 at gmail.com>
---
meta/lib/oe/image.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 2361955..f8aa88b 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -1,6 +1,7 @@
from oe.utils import execute_pre_post_process
import os
import subprocess
+import math
import multiprocessing
@@ -169,10 +170,7 @@ class Image(ImageDepGraph):
base_size = size_kb * overhead_factor
base_size = (base_size, rootfs_req_size)[base_size < rootfs_req_size] + \
rootfs_extra_space
-
- if base_size != int(base_size):
- base_size = int(base_size + 1)
-
+ base_size = int(math.ceil(base_size))
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
--
2.5.0
More information about the Openembedded-core
mailing list