summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2015-09-16 11:48:44 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-16 22:15:06 +0100
commitbf74a002b8fa18d94cec93f0341cbe74cc010ca7 (patch)
tree1f8872a25b4221fe2ac9c4c6229066753bd07b5b /meta/lib
parent3273129552916659b2217e944eeaf8eb4c2ecf54 (diff)
downloadopenembedded-core-bf74a002b8fa18d94cec93f0341cbe74cc010ca7.tar.gz
openembedded-core-bf74a002b8fa18d94cec93f0341cbe74cc010ca7.tar.bz2
openembedded-core-bf74a002b8fa18d94cec93f0341cbe74cc010ca7.zip
image.py: Ensure base image size is an integer
There is a floating point multiplication done of a base image size and an "overhead factor", which is currently rounded up to the next integer. If the multiplication results in a whole number, the value will still be a float. When this float is used to generate a shell script, a buggy script is generated. Fix this by always forcing to an integer. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/image.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 2361955971..f9e9bfd587 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -172,6 +172,8 @@ class Image(ImageDepGraph):
if base_size != int(base_size):
base_size = int(base_size + 1)
+ else:
+ base_size = int(base_size)
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment