diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-16 11:48:44 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-18 09:05:29 +0100 |
commit | 18845508a216106a703558c4dedcef4fa384673a (patch) | |
tree | c76dd501ab8e271aaed98d9a47a1c702d6f1befb /meta/lib/oe/image.py | |
parent | ec72426c829ac763a4f7ba5d2d54b3b5263eb69d (diff) | |
download | poky-18845508a216106a703558c4dedcef4fa384673a.tar.gz |
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.
(From OE-Core rev: bf74a002b8fa18d94cec93f0341cbe74cc010ca7)
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/image.py')
-rw-r--r-- | meta/lib/oe/image.py | 2 |
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): | |||
172 | 172 | ||
173 | if base_size != int(base_size): | 173 | if base_size != int(base_size): |
174 | base_size = int(base_size + 1) | 174 | base_size = int(base_size + 1) |
175 | else: | ||
176 | base_size = int(base_size) | ||
175 | 177 | ||
176 | base_size += rootfs_alignment - 1 | 178 | base_size += rootfs_alignment - 1 |
177 | base_size -= base_size % rootfs_alignment | 179 | base_size -= base_size % rootfs_alignment |