[oe-commits] Laurentiu Palcu : lib/oe/image.py: fix image size calculation routine

git at git.openembedded.org git at git.openembedded.org
Tue Feb 11 11:56:30 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd

Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date:   Thu Jan 30 14:40:48 2014 +0200

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 at intel.com>

---

 meta/lib/oe/image.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 0049d46..ccc849d 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)



More information about the Openembedded-commits mailing list