Skip to content

Commit

Permalink
Remove duplicite CPE trees for fedora platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Dec 15, 2022
1 parent 96988bd commit a0fa9a2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,16 @@ def _merge_cpe_trees_applicable_for_rule(self, rule_cpe_tree, groups_cpe_tree):
cpe_tree.children.append(rule_cpe_tree)
if groups_cpe_tree.value is not None:
cpe_tree.children.append(groups_cpe_tree)

skip_fedora = False
for profile_platform in self.profile_platforms:
if "fedora" in profile_platform and skip_fedora:
continue
if profile_platform in self.platform_to_oval_cpe_id:
cpe_oval_id = self.platform_to_oval_cpe_id[profile_platform]
cpe_tree.children.append(self._get_cpe_tree_of_profile_platform(cpe_oval_id))
if "fedora" in profile_platform:
skip_fedora = True
return cpe_tree

def build_cpe_tree(self, rule):
Expand Down

0 comments on commit a0fa9a2

Please sign in to comment.