Bug 12204

Summary: Some recipe events do not include packages
Product: [Build System, Metadata & Runtime] Toaster Reporter: David Reyna <david.reyna>
Component: toasterAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, stanciux.mihail
Version: unspecified   
Target Milestone: 2.4.2   
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 2017-10-06 20:55:53 UTC
Most "SinglePackageInfo" events include package data, including the keys: 

  'FILES_INFO', 'LICENSE', 'PKGR', 'ALLOW_EMPTY', 'PKG', 'PKGSIZE', 'RDEPENDS', 'PKGV', 'SECTION', 'FILES', 'OPKGN', 'DESCRIPTION', 'PR', 'PN', 'PV', 'SUMMARY'

However, some events do not, for example:

  package_info:{'OPKGN': 'lib32-update-rc.d-staticdev', 'PKG': 'update-rc.d-staticdev'}
  package_info:{'OPKGN': 'lib64-os-release', 'PKG': 'os-release'}

These minimal events cause in exceptions in the existing Toaster code, and need to be handled:

  ERROR: 'PN'
  Traceback (most recent call last):
    File "/opt/dreyna/foo/bitbake/lib/bb/ui/toasterui.py", line 410, in main
      buildinfohelper.store_build_package_information(event)
    File "/opt/dreyna/foo/bitbake/lib/bb/ui/buildinfohelper.py", line 1564, in store_build_package_information
      built_package=True)
    File "/opt/dreyna/foo/bitbake/lib/bb/ui/buildinfohelper.py", line 729, in save_build_package_information
    built_recipe = recipes[package_info['PN']]
  KeyError: 'PN'
Comment 1 David Reyna 2018-04-02 22:50:39 UTC
(Bitbake rev: 567f072ff260614cde3da220a40a95d5a8b9ab92)