Bug 14764

Summary: Event 'ImagePkgList' has 'PKGSIZE' key as an empty string
Product: [Build System, Metadata & Runtime] BitBake Reporter: David Reyna <david.reyna>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 3.4.3   
Target Milestone: 4.0 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description David Reyna 2022-03-18 10:00:59 UTC
The key field for the package size ('PKGSIZE') currently is an empty string for the 'ImagePkgList' event, and probably also the "SinglePackageInfo" event.

Here is an example event content:

{'PN': 'linux-yocto',
 'PV': '5.15.26+gitAUTOINC+ea948a0983_5bd4bda819',
 'PR': 'r0',
 'PKGV': '5.15.26+git0+ea948a0983_5bd4bda819',
 'PKGR': 'r0',
 'LICENSE': 'GPL-2.0-only',
 'DESCRIPTION': 'Linux kernel.',
 'SUMMARY': 'Linux kernel',
 '': '9536128',                  #<<<========
 'SECTION': 'kernel',
 'ALLOW': '1',
 'FILES': '{"/boot/bzImage-5.15.26-yocto-standard": 9536128}'
}

Toaster is working around this issue as per 14763: Toaster: handle changes to "ImagePkgList" event
Comment 1 David Reyna 2022-03-18 19:49:31 UTC
For the bigger picture, there were several oddities in the event data that Toaster in encountering that it needed to workaround (see 14763).

The missing key field for the package size ('PKGSIZE') is an obvious defect, but I cannot tell from Toaster's perspective if the other observed changes are intentional or not.

Here are the full list of observed anomalies, as per Bug 14763.

* The 'ImagePkgList' event:
1) The key field for the package size ('PKGSIZE') currently is an empty string.
2) The list of files changed from 'FILES_INFO' to 'FILES' (or 'FILES_INFO' is just missing).
3) The 'FILES' is a dictionary in string form, whereas 'FILES_INFO' was already in a dictionary form.
4) Not all fields are always present for all packages like they used to be, for example 'LICENSE' and 'SUMMARY'

* Additionally, for The 'SinglePackageInfo" event:
5) The 'PKG' key is no longer present, which Toaster normally uses as the package's 'installed_name'. Toaster does expect that 'OPKGN' is an allowed override, but that is not encountered in the normal (presumably RPM-centric) data set.
Comment 2 David Reyna 2022-03-21 20:49:31 UTC
This is fixed by a patch to "meta/classes/toaster.bbclass"

https://git.yoctoproject.org/poky/commit/?h=master-next&id=c94d49a769244e72df6631fdd4078cd1ad317e04