Skip to content

Commit

Permalink
[vigiles.bbclass] Sort package dependencies and component_type
Browse files Browse the repository at this point in the history
List package dependencies and component type in the same order to avoid SBOM hash changing due to changes in this order
  • Loading branch information
indresh-timesys committed Jun 21, 2023
1 parent 0d8b5ac commit 6fec865
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/vigiles.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ def vigiles_image_collect(d):
dict_out['packages'][key].update({
'package_supplier': d.getVar('SPDX_SUPPLIER'),
'dependencies': {
'build': bdeps.get('deps', []),
'runtime': rdeps.get('deps', []),
'build': sorted(bdeps.get('deps', [])),
'runtime': sorted(rdeps.get('deps', [])),
},

})
Expand All @@ -554,6 +554,7 @@ def vigiles_image_collect(d):
continue
if component_type and component_type not in component_type_list:
dict_out["packages"][dep]["component_type"].append(component_type)
dict_out["packages"][dep]["component_type"].sort()
if "component" not in component_type_list:
if "build" in component_type_list and "runtime" in component_type_list:
dict_out['packages'][dep]["comment"] = dependency_only_comment["build&runtime"]
Expand Down

0 comments on commit 6fec865

Please sign in to comment.