Skip to content

Commit

Permalink
try to guess a bit better in generate_sbom (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfinder authored Nov 28, 2024
1 parent 54e7017 commit 433e98c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions generate_sbom
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ sub dump_rpmdb {
chomp $path;
$dbpath = $path if $path && $path =~ /^\//;
}
$dbpath ||= '/usr/lib/sysimage/rpm' if -e "$root/usr/lib/sysimage/rpm/Packages" || -e "$root/usr/lib/sysimage/rpm/Package.db";
$dbpath ||= '/var/lib/rpm'; # guess
# try to dump with rpmdb_dump
if (-s "$root$dbpath/Packages" && can_run($root, '/usr/lib/rpm/rpmdb_dump')) {
Expand Down

0 comments on commit 433e98c

Please sign in to comment.