Skip to content

Commit

Permalink
[tsmeta.bbclass] Improve error handling in the get_manifest_pkgs() fu…
Browse files Browse the repository at this point in the history
…nction for when the "IMAGE_MANIFEST" does not contain a valid path

Based on the patch shared by Darren Lissimore.
  • Loading branch information
harish-bansal committed Jun 30, 2023
1 parent ac5010b commit 05bc6a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/tsmeta.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -884,12 +884,12 @@ def tsmeta_pn_list(d):
manifest_path = d.getVar('IMAGE_MANIFEST')

rootfs_pkgs = list()
if os.path.exists(manifest_path):
if manifest_path and os.path.exists(manifest_path):
bb.plain("Using RootFS Manifest %s" % manifest_path)
with open(manifest_path) as f_desc:
rootfs_pkgs = [ line.split()[0] for line in f_desc ]
else:
bb.error("RootFS Manifest Not Found: %s" % manifest_path)
bb.warn("RootFS Manifest Not Found: %s. Generated SBOM might be incomplete." % manifest_path)
return rootfs_pkgs

pkg_pn_map = get_pkg_lookup()
Expand Down

0 comments on commit 05bc6a4

Please sign in to comment.