summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-12-02 18:58:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-03 17:45:54 +0000
commit8a02406f1c1fa76bd43372a0f1936d0ebf71e668 (patch)
tree51b0d643f8b6d0df57fcde4a4ad01fecbf7506d7 /bitbake/lib
parentd1e66643ae2e379f5e51ab9370ef8cb7e66dcb35 (diff)
downloadast2050-yocto-poky-8a02406f1c1fa76bd43372a0f1936d0ebf71e668.zip
ast2050-yocto-poky-8a02406f1c1fa76bd43372a0f1936d0ebf71e668.tar.gz
bitbake: lib/bb/ui: handle PKGSIZE change to bytes
PKGSIZE is now in bytes in pkgdata, so we need to treat it as such in the UI code for Hob / Toaster. (Bitbake rev: 3b5ff814cd4a3efa4b17c6b343ec39c9acca5c9e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py2
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py7
2 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 2c9d77a..61149fa 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -188,7 +188,7 @@ class ORMWrapper(object):
revision = package_info['PKGR'],
summary = package_info['SUMMARY'],
description = package_info['DESCRIPTION'],
- size = int(package_info['PKGSIZE']) * 1024,
+ size = int(package_info['PKGSIZE']),
section = package_info['SECTION'],
license = package_info['LICENSE'],
)
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index 79e909c..cffe6e1 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -251,7 +251,7 @@ class PackageListModel(gtk.ListStore):
pkgv = getpkgvalue(pkginfo, 'PKGV', pkg)
pkgr = getpkgvalue(pkginfo, 'PKGR', pkg)
# PKGSIZE is artificial, will always be overridden with the package name if present
- pkgsize = pkginfo.get('PKGSIZE_%s' % pkg, "0")
+ pkgsize = int(pkginfo.get('PKGSIZE_%s' % pkg, "0"))
# PKG_%s is the renamed version
pkg_rename = pkginfo.get('PKG_%s' % pkg, "")
# The rest may be overridden or not
@@ -268,11 +268,10 @@ class PackageListModel(gtk.ListStore):
allow_empty = getpkgvalue(pkginfo, 'ALLOW_EMPTY', pkg, "")
- if pkgsize == "0" and not allow_empty:
+ if pkgsize == 0 and not allow_empty:
continue
- # pkgsize is in KB
- size = HobPage._size_to_string(HobPage._string_to_size(pkgsize + ' KB'))
+ size = HobPage._size_to_string(pkgsize)
self.set(self.append(), self.COL_NAME, pkg, self.COL_VER, pkgv,
self.COL_REV, pkgr, self.COL_RNM, pkg_rename,
self.COL_SEC, section, self.COL_SUM, summary,
OpenPOWER on IntegriCloud