Skip to content

Commit 662d4ce

Browse files
authored
Add MI first in building container
1 parent 4125878 commit 662d4ce

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • jenkins_pipelines/scripts/edit_bci_project

jenkins_pipelines/scripts/edit_bci_project/edit.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,12 @@ def main():
279279
for p in mi_paths:
280280
repo_node.remove(p)
281281

282-
# Insert before the last path element
283-
remaining_paths = repo_node.findall("./path")
284-
insertion_index = list(repo_node).index(remaining_paths[-1]) if remaining_paths else 0
285-
282+
# Insert MI path at position 0 (highest priority) so it takes precedence
283+
# over all other repo paths during dependency resolution.
284+
# This ensures the MI package version wins over the released version.
286285
for i, repo_name in enumerate(mi_repo_names):
287286
new_path = ET.Element('path', {'project': args.mi_project, 'repository': repo_name})
288-
repo_node.insert(insertion_index + i, new_path)
287+
repo_node.insert(i, new_path)
289288

290289
with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp:
291290
tmp.write(ET.tostring(root, encoding='unicode'))

0 commit comments

Comments
 (0)