Add portage support for Gentoo Linux (#1076)

Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Zac Medico
2022-07-06 16:18:54 -04:00
committed by GitHub
co-authored by Christopher Phillips
parent ba685eada8
commit 4c55c62834
27 changed files with 1836 additions and 23 deletions
@@ -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 {