mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +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
@@ -24,6 +24,7 @@ const (
|
||||
DartPubPkg Type = "dart-pub"
|
||||
DotnetPkg Type = "dotnet"
|
||||
ConanPkg Type = "conan"
|
||||
PortagePkg Type = "portage"
|
||||
)
|
||||
|
||||
// AllPkgs represents all supported package types
|
||||
@@ -44,6 +45,7 @@ var AllPkgs = []Type{
|
||||
DartPubPkg,
|
||||
DotnetPkg,
|
||||
ConanPkg,
|
||||
PortagePkg,
|
||||
}
|
||||
|
||||
// PackageURLType returns the PURL package type for the current package.
|
||||
@@ -77,6 +79,8 @@ func (t Type) PackageURLType() string {
|
||||
return packageurl.TypeDotnet
|
||||
case ConanPkg:
|
||||
return packageurl.TypeConan
|
||||
case PortagePkg:
|
||||
return "portage"
|
||||
default:
|
||||
// TODO: should this be a "generic" purl type instead?
|
||||
return ""
|
||||
@@ -122,6 +126,8 @@ func TypeByName(name string) Type {
|
||||
return DotnetPkg
|
||||
case packageurl.TypeConan:
|
||||
return ConanPkg
|
||||
case "portage":
|
||||
return PortagePkg
|
||||
default:
|
||||
return UnknownPkg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user