mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
Add portage support for Gentoo Linux (#1076)
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
co-authored by
Christopher Phillips
parent
ba685eada8
commit
4c55c62834
@@ -37,6 +37,8 @@ func SourceInfo(p pkg.Package) string {
|
||||
answer = "acquired package info from PHP composer manifest"
|
||||
case pkg.ConanPkg:
|
||||
answer = "acquired package info from conan manifest"
|
||||
case pkg.PortagePkg:
|
||||
answer = "acquired package info from portage DB"
|
||||
default:
|
||||
answer = "acquired package info from the following paths"
|
||||
}
|
||||
|
||||
@@ -158,6 +158,14 @@ func Test_SourceInfo(t *testing.T) {
|
||||
"from conan manifest",
|
||||
},
|
||||
},
|
||||
{
|
||||
input: pkg.Package{
|
||||
Type: pkg.PortagePkg,
|
||||
},
|
||||
expected: []string{
|
||||
"from portage DB",
|
||||
},
|
||||
},
|
||||
}
|
||||
var pkgTypes []pkg.Type
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user