@@ -84,7 +84,7 @@ def process_file(self, file):
8484 for purl , constraints , is_unaffected in get_affected_and_fixed_purls (
8585 child , logger = self .log
8686 ):
87- constraints = build_constraints (constraints , logger = self .log )
87+ constraints = build_constraints ([ constraints ] , logger = self .log )
8888 version_range = EbuildVersionRange (constraints = constraints )
8989
9090 if is_unaffected :
@@ -164,6 +164,7 @@ def get_affected_and_fixed_purls(affected_elem, logger):
164164 # All possible values of info.attrib['range'] =
165165 # {'gt', 'lt', 'rle', 'rge', 'rgt', 'le', 'ge', 'eq'}
166166 # rge means revision greater than equals and rgt means revision greater than
167+ # TODO Revisit issue:
167168 range_value = info .attrib .get ("range" )
168169 slot_value = info .attrib .get ("slot" )
169170 comparator_dict = {
@@ -183,13 +184,4 @@ def get_affected_and_fixed_purls(affected_elem, logger):
183184
184185 qualifiers = {"slot" : slot_value } if slot_value else {}
185186 purl = PackageURL (type = "ebuild" , name = pkg_name , namespace = pkg_ns , qualifiers = qualifiers )
186-
187- constraints = [(comparator , info .text )]
188- if range_value in ["rgt" , "rge" , "rle" ]:
189- try :
190- next_minor_version = str (GentooVersion (info .text ).bump ())
191- invert_comp = "<" if range_value in ["rgt" , "rge" ] else ">"
192- constraints .append ((invert_comp , next_minor_version ))
193- except Exception as e :
194- logger (f"Invalid Gentoo version for bumping: { info .text } - { e } " )
195- yield purl , constraints , (info .tag == "unaffected" )
187+ yield purl , (comparator , info .text ), (info .tag == "unaffected" )
0 commit comments