diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-12-02 18:58:45 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-03 17:45:54 +0000 |
commit | 8a02406f1c1fa76bd43372a0f1936d0ebf71e668 (patch) | |
tree | 51b0d643f8b6d0df57fcde4a4ad01fecbf7506d7 /bitbake/lib | |
parent | d1e66643ae2e379f5e51ab9370ef8cb7e66dcb35 (diff) | |
download | 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.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 2c9d77abb3..61149fafd7 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -188,7 +188,7 @@ class ORMWrapper(object): | |||
188 | revision = package_info['PKGR'], | 188 | revision = package_info['PKGR'], |
189 | summary = package_info['SUMMARY'], | 189 | summary = package_info['SUMMARY'], |
190 | description = package_info['DESCRIPTION'], | 190 | description = package_info['DESCRIPTION'], |
191 | size = int(package_info['PKGSIZE']) * 1024, | 191 | size = int(package_info['PKGSIZE']), |
192 | section = package_info['SECTION'], | 192 | section = package_info['SECTION'], |
193 | license = package_info['LICENSE'], | 193 | license = package_info['LICENSE'], |
194 | ) | 194 | ) |
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index 79e909c7f1..cffe6e14b4 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): | |||
251 | pkgv = getpkgvalue(pkginfo, 'PKGV', pkg) | 251 | pkgv = getpkgvalue(pkginfo, 'PKGV', pkg) |
252 | pkgr = getpkgvalue(pkginfo, 'PKGR', pkg) | 252 | pkgr = getpkgvalue(pkginfo, 'PKGR', pkg) |
253 | # PKGSIZE is artificial, will always be overridden with the package name if present | 253 | # PKGSIZE is artificial, will always be overridden with the package name if present |
254 | pkgsize = pkginfo.get('PKGSIZE_%s' % pkg, "0") | 254 | pkgsize = int(pkginfo.get('PKGSIZE_%s' % pkg, "0")) |
255 | # PKG_%s is the renamed version | 255 | # PKG_%s is the renamed version |
256 | pkg_rename = pkginfo.get('PKG_%s' % pkg, "") | 256 | pkg_rename = pkginfo.get('PKG_%s' % pkg, "") |
257 | # The rest may be overridden or not | 257 | # The rest may be overridden or not |
@@ -268,11 +268,10 @@ class PackageListModel(gtk.ListStore): | |||
268 | 268 | ||
269 | allow_empty = getpkgvalue(pkginfo, 'ALLOW_EMPTY', pkg, "") | 269 | allow_empty = getpkgvalue(pkginfo, 'ALLOW_EMPTY', pkg, "") |
270 | 270 | ||
271 | if pkgsize == "0" and not allow_empty: | 271 | if pkgsize == 0 and not allow_empty: |
272 | continue | 272 | continue |
273 | 273 | ||
274 | # pkgsize is in KB | 274 | size = HobPage._size_to_string(pkgsize) |
275 | size = HobPage._size_to_string(HobPage._string_to_size(pkgsize + ' KB')) | ||
276 | self.set(self.append(), self.COL_NAME, pkg, self.COL_VER, pkgv, | 275 | self.set(self.append(), self.COL_NAME, pkg, self.COL_VER, pkgv, |
277 | self.COL_REV, pkgr, self.COL_RNM, pkg_rename, | 276 | self.COL_REV, pkgr, self.COL_RNM, pkg_rename, |
278 | self.COL_SEC, section, self.COL_SUM, summary, | 277 | self.COL_SEC, section, self.COL_SUM, summary, |