mirror of
https://github.com/anchore/syft.git
synced 2026-02-14 19:46:42 +01:00
Expanded dpkg cataloger globs (#3373)
Signed-off-by: Nathan Voss <njvoss299@gmail.com>
This commit is contained in:
parent
06d300e662
commit
b505317e10
@ -14,6 +14,6 @@ func NewDBCataloger() pkg.Cataloger {
|
|||||||
return generic.NewCataloger("dpkg-db-cataloger").
|
return generic.NewCataloger("dpkg-db-cataloger").
|
||||||
// note: these globs have been intentionally split up in order to improve search performance,
|
// note: these globs have been intentionally split up in order to improve search performance,
|
||||||
// please do NOT combine into: "**/var/lib/dpkg/{status,status.d/*}"
|
// please do NOT combine into: "**/var/lib/dpkg/{status,status.d/*}"
|
||||||
WithParserByGlobs(parseDpkgDB, "**/var/lib/dpkg/status", "**/var/lib/dpkg/status.d/*", "**/lib/opkg/info/*.control", "**/lib/opkg/status").
|
WithParserByGlobs(parseDpkgDB, "**/lib/dpkg/status", "**/lib/dpkg/status.d/*", "**/lib/opkg/info/*.control", "**/lib/opkg/status").
|
||||||
WithProcessors(dependency.Processor(dbEntryDependencySpecifier))
|
WithProcessors(dependency.Processor(dbEntryDependencySpecifier))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -234,10 +234,12 @@ func TestCataloger_Globs(t *testing.T) {
|
|||||||
name: "obtain db status files",
|
name: "obtain db status files",
|
||||||
fixture: "test-fixtures/glob-paths",
|
fixture: "test-fixtures/glob-paths",
|
||||||
expected: []string{
|
expected: []string{
|
||||||
|
"usr/lib/dpkg/status",
|
||||||
"var/lib/dpkg/status",
|
"var/lib/dpkg/status",
|
||||||
|
"usr/lib/dpkg/status.d/pkg-1.0",
|
||||||
"var/lib/dpkg/status.d/pkg-1.0",
|
"var/lib/dpkg/status.d/pkg-1.0",
|
||||||
"usr/lib/opkg/status",
|
|
||||||
"usr/lib/opkg/info/pkg-1.0.control",
|
"usr/lib/opkg/info/pkg-1.0.control",
|
||||||
|
"usr/lib/opkg/status",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
bogus status
|
||||||
@ -0,0 +1 @@
|
|||||||
|
bogus package
|
||||||
Loading…
x
Reference in New Issue
Block a user