@@ -124,6 +124,10 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
124124 pruned_build_specs = copy .copy (build_specs )
125125
126126 update_dependencies = pruned_build_specs .pop ('update_deps' , None )
127+ ignore_versionsuffixes = pruned_build_specs .pop ('ignore_versionsuffixes' , None )
128+ if ignore_versionsuffixes and not update_dependencies :
129+ print_warning ("--try-ignore-versionsuffixes is ignored if --try-update-deps is not True" )
130+ ignore_versionsuffixes = False
127131 if 'toolchain' in pruned_build_specs :
128132 target_toolchain = pruned_build_specs .pop ('toolchain' )
129133 pruned_build_specs .pop ('toolchain_name' , '' )
@@ -195,7 +199,8 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
195199 new_ec_file = map_easyconfig_to_target_tc_hierarchy (orig_ec ['spec' ], src_to_dst_tc_mapping ,
196200 targetdir = tweaked_ecs_path ,
197201 update_build_specs = pruned_build_specs ,
198- update_dep_versions = update_dependencies )
202+ update_dep_versions = update_dependencies ,
203+ ignore_versionsuffixes = ignore_versionsuffixes )
199204 # Need to update the toolchain in the build_specs to match the toolchain mapping
200205 keys = verification_build_specs .keys ()
201206 if 'toolchain_name' in keys :
@@ -217,7 +222,8 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
217222 # Note pruned_build_specs are not passed down for dependencies
218223 map_easyconfig_to_target_tc_hierarchy (orig_ec ['spec' ], src_to_dst_tc_mapping ,
219224 targetdir = tweaked_ecs_deps_path ,
220- update_dep_versions = update_dependencies )
225+ update_dep_versions = update_dependencies ,
226+ ignore_versionsuffixes = ignore_versionsuffixes )
221227 else :
222228 tweak_one (orig_ec ['spec' ], None , build_specs , targetdir = tweaked_ecs_deps_path )
223229
@@ -939,7 +945,7 @@ def get_matching_easyconfig_candidates(prefix_stub, toolchain):
939945
940946
941947def map_easyconfig_to_target_tc_hierarchy (ec_spec , toolchain_mapping , targetdir = None , update_build_specs = None ,
942- update_dep_versions = False ):
948+ update_dep_versions = False , ignore_versionsuffixes = False ):
943949 """
944950 Take an easyconfig spec, parse it, map it to a target toolchain and dump it out
945951
@@ -1033,8 +1039,12 @@ def map_easyconfig_to_target_tc_hierarchy(ec_spec, toolchain_mapping, targetdir=
10331039 elif update_dep_versions :
10341040 # search for available updates for this dependency:
10351041 # first get highest version candidate paths for this (include search through subtoolchains)
1036- potential_version_mappings = find_potential_version_mappings (dep , toolchain_mapping ,
1037- versionsuffix_mapping = versonsuffix_mapping )
1042+ potential_version_mappings = find_potential_version_mappings (
1043+ dep ,
1044+ toolchain_mapping ,
1045+ versionsuffix_mapping = versonsuffix_mapping ,
1046+ ignore_versionsuffixes = ignore_versionsuffixes
1047+ )
10381048 # only highest version match is retained by default in potential_version_mappings,
10391049 # compare that version to the original version and replace if appropriate (upgrades only).
10401050 if potential_version_mappings :
@@ -1091,7 +1101,7 @@ def list_deps_versionsuffixes(ec_spec):
10911101
10921102
10931103def find_potential_version_mappings (dep , toolchain_mapping , versionsuffix_mapping = None , highest_versions_only = True ,
1094- ignore_versionsuffix = False ):
1104+ ignore_versionsuffixes = False ):
10951105 """
10961106 Find potential version mapping for a dependency in a new hierarchy
10971107
@@ -1207,7 +1217,7 @@ def find_potential_version_mappings(dep, toolchain_mapping, versionsuffix_mappin
12071217
12081218 exclude_alternate_versionsuffixes = False
12091219 if ignored_versionsuffix_greater :
1210- if ignore_versionsuffix :
1220+ if ignore_versionsuffixes :
12111221 highest_version = highest_version_ignoring_versionsuffix
12121222 else :
12131223 print_warning (
0 commit comments