mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
Add pacman (alpm) parser support (#943)
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
co-authored by
Christopher Phillips
parent
f15d4a9984
commit
e72d68b0c6
@@ -9,6 +9,7 @@ const (
|
||||
// the full set of supported packages
|
||||
UnknownPkg Type = "UnknownPackage"
|
||||
ApkPkg Type = "apk"
|
||||
AlpmPkg Type = "alpm"
|
||||
GemPkg Type = "gem"
|
||||
DebPkg Type = "deb"
|
||||
RpmPkg Type = "rpm"
|
||||
@@ -27,6 +28,7 @@ const (
|
||||
// AllPkgs represents all supported package types
|
||||
var AllPkgs = []Type{
|
||||
ApkPkg,
|
||||
AlpmPkg,
|
||||
GemPkg,
|
||||
DebPkg,
|
||||
RpmPkg,
|
||||
@@ -47,6 +49,8 @@ func (t Type) PackageURLType() string {
|
||||
switch t {
|
||||
case ApkPkg:
|
||||
return "alpine"
|
||||
case AlpmPkg:
|
||||
return "alpm"
|
||||
case GemPkg:
|
||||
return packageurl.TypeGem
|
||||
case DebPkg:
|
||||
@@ -90,6 +94,8 @@ func TypeByName(name string) Type {
|
||||
return DebPkg
|
||||
case packageurl.TypeRPM:
|
||||
return RpmPkg
|
||||
case "alpm":
|
||||
return AlpmPkg
|
||||
case "alpine":
|
||||
return ApkPkg
|
||||
case packageurl.TypeMaven:
|
||||
|
||||
Reference in New Issue
Block a user