summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-01-30 14:40:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:50:31 +0000
commitf3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd (patch)
treeef44b11e41a9cff2821987054a46bf02395b2adf /meta
parent127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e (diff)
downloadopenembedded-core-f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd.tar.gz
openembedded-core-f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd.tar.bz2
openembedded-core-f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd.zip
lib/oe/image.py: fix image size calculation routine
The IMAGE_ROOTFS_EXTRA_SPACE value was not correctly added to the base size. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/image.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 0049d46472..ccc849da29 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -34,8 +34,8 @@ class Image(object):
self.d.getVar('IMAGE_ROOTFS', True)])
size_kb = int(output.split()[0])
base_size = size_kb * overhead_factor
- if base_size < rootfs_req_size:
- base_size = rootfs_req_size + rootfs_extra_space
+ 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)