Bug 14763 - Toaster: handle changes to "ImagePkgList" event
Summary: Toaster: handle changes to "ImagePkgList" event
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 3.4.3
Hardware: x86 Multiple
: Low normal
Target Milestone: 4.0 M4
Assignee: David Reyna
QA Contact: Toaster default assignee
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-03-18 09:54 UTC by David Reyna
Modified: 2022-03-21 21:38 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Reyna 2022-03-18 09:54:45 UTC
There are several changes to the "ImagePkgList" content.

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'.
3) The 'FILES' is now a dictionary in string form
4) Not all fields are always present for all packages, for example 'LICENSE' and 'SUMMARY'

Here is an example event data where 'PKGSIZE' is a blank string.

{'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}'
}
Comment 1 David Reyna 2022-03-18 19:34:19 UTC
This patch also works around the now missing 'PKG' key from the "SinglePackageInfo" event.

Toaster usually uses as the package's 'installed_name'. Toaster does expect that 'OPKGN' is an allowed override.

The key 'PN' is still present, so the patch uses that value as an alternative.
Comment 2 David Reyna 2022-03-18 19:36:47 UTC
As per an email thread with Richard, this patch is specifically to work around the problems in the event data encountered. Fortunately these were the only events thus affected.

If and as the original data and formatting does get restored, you will observe that the patch is written to use that respective original schema.

After the core problems are fixed, then this patch (or parts) can be dropped.

As a result of these discoveries, I filed Bug 14764 directly against Bitbake since there was obvious missing formatting with 'PKGSIZE'. As for the other problems, I could not tell if they were intentional changes or not.  I will update Bug 14764 so that it is one stop shopping for that team.
Comment 3 David Reyna 2022-03-21 20:54:18 UTC
This is fixed by a patch to "meta/classes/toaster.bbclass"

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