Patchwork [bitbake-devel] hob: image size displayed wrong size in edit packages screen

login
register
mail settings
Submitter Andrei Dinu
Date Oct. 12, 2012, 9:06 a.m.
Message ID <1350032783-18499-1-git-send-email-andrei.adrianx.dinu@intel.com>
Download mbox | patch
Permalink /patch/38107/
State New
Headers show

Comments

Andrei Dinu - Oct. 12, 2012, 9:06 a.m.
size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
    from /bitbake/lib/bb/ui/crumbs/hobpages.py file transformed
    the size in MB. In our file it was again multiplied by 1024
    instead of doing a division by 1024, which brought a faulty size on
    the edit packages screen.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/packageselectionpage.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Richard Purdie - Oct. 24, 2012, 8:10 p.m.
On Fri, 2012-10-12 at 12:06 +0300, Andrei Dinu wrote:
> size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
>     from /bitbake/lib/bb/ui/crumbs/hobpages.py file transformed
>     the size in MB. In our file it was again multiplied by 1024
>     instead of doing a division by 1024, which brought a faulty size on
>     the edit packages screen.
> 
> Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
> ---
>  bitbake/lib/bb/ui/crumbs/packageselectionpage.py |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index 6792fe0..8eb388e 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -208,8 +208,8 @@  class PackageSelectionPage (HobPage):
         selected_packages_size_str = HobPage._size_to_string(selected_packages_size)
 
         image_overhead_factor = self.builder.configuration.image_overhead_factor
-        image_rootfs_size = self.builder.configuration.image_rootfs_size * 1024 # image_rootfs_size is KB
-        image_extra_size = self.builder.configuration.image_extra_size * 1024 # image_extra_size is KB
+        image_rootfs_size = self.builder.configuration.image_rootfs_size / 1024 # image_rootfs_size is KB
+        image_extra_size = self.builder.configuration.image_extra_size / 1024 # image_extra_size is KB
         base_size = image_overhead_factor * selected_packages_size
         image_total_size = max(base_size, image_rootfs_size) + image_extra_size
         if "zypper" in self.builder.configuration.selected_packages: