Skip to content

Commit

Permalink
generate_sbom: fix support for older RPM versions
Browse files Browse the repository at this point in the history
Do not abort in dump_rpmdb in case rpmdb does not support --exportdb but use
fallback using /usr/lib/rpm/rpmdb_dump.
  • Loading branch information
jgleissner committed Nov 8, 2023
1 parent 14d1817 commit cd0eaf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate_sbom
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ sub dump_rpmdb {
} else {
system_chroot($root, 'stdout', $outfile, '/usr/bin/rpmdb', '--exportdb');
}
exit($?) if $?;
return;
}
exit($?) if $?;
return;
}
# try to get the dbpath from the root if we can
if (!$dbpath && can_run($root, '/usr/bin/rpm')) {
Expand Down

0 comments on commit cd0eaf7

Please sign in to comment.