Add pacman (alpm) parser support (#943)

Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Morten Linderud
2022-06-13 18:51:37 +00:00
committed by GitHub
co-authored by Christopher Phillips
parent f15d4a9984
commit e72d68b0c6
42 changed files with 2348 additions and 43 deletions
@@ -9,6 +9,8 @@ import (
func SourceInfo(p pkg.Package) string {
answer := ""
switch p.Type {
case pkg.AlpmPkg:
answer = "acquired package info from ALPM DB"
case pkg.RpmPkg:
answer = "acquired package info from RPM DB"
case pkg.ApkPkg:
@@ -142,6 +142,14 @@ func Test_SourceInfo(t *testing.T) {
"from dotnet project assets file",
},
},
{
input: pkg.Package{
Type: pkg.AlpmPkg,
},
expected: []string{
"from ALPM DB",
},
},
}
var pkgTypes []pkg.Type
for _, test := range tests {