Skip to content

Commit b9c957d

Browse files
committed
T9203: Enrich SBOM files with additional metadata
1 parent 4fb76dc commit b9c957d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/image-build/build-vyos-image

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,10 @@ Pin-Priority: 600
759759
for line in p.stdout:
760760
sys.stdout.write(line)
761761
sys.stdout.flush()
762-
p.wait()
762+
if p.wait() != 0:
763+
raise ImageBuildError(
764+
f'SBOM command failed with exit status {p.returncode}: {" ".join(unsquashfs_cmd)}'
765+
)
763766

764767
# VyOS declares ID=vyos with no ID_LIKE, therefore Syft can't detect the system correctly
765768
with open(os.path.join(syft_target_dir, 'etc/os-release'), 'a') as f:
@@ -794,7 +797,10 @@ Pin-Priority: 600
794797
for line in p.stdout:
795798
sys.stdout.write(line)
796799
sys.stdout.flush()
797-
p.wait()
800+
if p.wait() != 0:
801+
raise ImageBuildError(
802+
f'SBOM command failed with exit status {p.returncode}: {" ".join(c)}'
803+
)
798804

799805
# Add metadata.authors/supplier/lifecycles information to the SBOM file
800806
cdx_file = f'{base_filename}.cdx.json'

0 commit comments

Comments
 (0)