Skip to content

Commit

Permalink
remove Flavers. Will be added in PR for OracleLinux
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Jun 21, 2023
1 parent 8a63aed commit d500e5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ type Advisory struct {
FixedVersion string `json:",omitempty"`
AffectedVersion string `json:",omitempty"` // Only for Arch Linux

// Advisory can contain different fixed versions for different architectures/flavors(see Oracle Linux)
// Advisory can contain different fixed versions for different architectures
FixedVersions FixedVersions `json:",omitempty"`

// MajorVersion ranges for language-specific package
Expand All @@ -138,7 +138,6 @@ type FixedVersion struct {
FixedVersion string
Arch string
VendorID string
Flavor string // For Oracle Linux: (fips, ksplice1, etc...)
}

type Vulnerability struct {
Expand All @@ -162,7 +161,6 @@ type Ecosystem string
func (versions FixedVersions) IsDuplicate(ver FixedVersion) bool {
for _, version := range versions {
if version.FixedVersion == ver.FixedVersion &&
version.Flavor == ver.Flavor &&
version.Arch == ver.Arch &&
version.VendorID == ver.VendorID {
return true
Expand Down
2 changes: 1 addition & 1 deletion pkg/vulnsrc/rocky/rocky.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (vs *VulnSrc) commit(tx *bolt.Tx, platformName string, errata []RLSA) error
VendorID: erratum.ID,
}

// if advisory for this package and CVE was saved - add new architecture
// if the advisory for this package and CVE have been kept - just add the new architecture
if adv, ok := input.Advisories[pkg.Name]; ok {
// don't include duplicates
if !adv.FixedVersions.IsDuplicate(fixedVersion) {
Expand Down

0 comments on commit d500e5f

Please sign in to comment.