mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
keep original dpkg md5sum location
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
0030880e74
commit
a5537943fa
@ -109,15 +109,12 @@ func fetchMd5Contents(resolver source.Resolver, dbLocation source.Location, pkgs
|
|||||||
for _, p := range pkgs {
|
for _, p := range pkgs {
|
||||||
// look for /var/lib/dpkg/info/NAME:ARCH.md5sums
|
// look for /var/lib/dpkg/info/NAME:ARCH.md5sums
|
||||||
name := md5Key(p)
|
name := md5Key(p)
|
||||||
md5sumPath := path.Join(parentPath, "info", name+md5sumsExt)
|
md5SumLocation := resolver.RelativeFileByPath(dbLocation, path.Join(parentPath, "info", name+md5sumsExt))
|
||||||
md5SumLocation := resolver.RelativeFileByPath(dbLocation, md5sumPath)
|
|
||||||
|
|
||||||
if md5SumLocation == nil {
|
if md5SumLocation == nil {
|
||||||
// the most specific key did not work, fallback to just the name
|
// the most specific key did not work, fallback to just the name
|
||||||
// look for /var/lib/dpkg/info/NAME.md5sums
|
// look for /var/lib/dpkg/info/NAME.md5sums
|
||||||
name = p.Name
|
md5SumLocation = resolver.RelativeFileByPath(dbLocation, path.Join(parentPath, "info", p.Name+md5sumsExt))
|
||||||
md5sumPath = path.Join(parentPath, "info", name+md5sumsExt)
|
|
||||||
md5SumLocation = resolver.RelativeFileByPath(dbLocation, md5sumPath)
|
|
||||||
}
|
}
|
||||||
// we should have at least one reference
|
// we should have at least one reference
|
||||||
if md5SumLocation != nil {
|
if md5SumLocation != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user