]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/image.py: fix get rootfs_extra_space failed
authorHongxu Jia <hongxu.jia@windriver.com>
Sun, 26 Jan 2014 10:20:49 +0000 (18:20 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2014 11:50:29 +0000 (11:50 +0000)
The value of IMAGE_ROOTFS_EXTRA_SPACE is "0 + 51200",
we should use eval rather than int in python.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
meta/lib/oe/image.py

index c4fd558484bca6a95d5af98970df0a08f2c3c16a..0049d464723502eb20ffdc8edaa4e2f8f8fa9c3c 100644 (file)
@@ -28,7 +28,7 @@ class Image(object):
         rootfs_alignment = int(self.d.getVar('IMAGE_ROOTFS_ALIGNMENT', True))
         overhead_factor = float(self.d.getVar('IMAGE_OVERHEAD_FACTOR', True))
         rootfs_req_size = int(self.d.getVar('IMAGE_ROOTFS_SIZE', True))
-        rootfs_extra_space = int(self.d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
+        rootfs_extra_space = eval(self.d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
 
         output = subprocess.check_output(['du', '-ks',
                                           self.d.getVar('IMAGE_ROOTFS', True)])