summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/oe-go-mod-fetcher-hybrid.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/oe-go-mod-fetcher-hybrid.py b/scripts/oe-go-mod-fetcher-hybrid.py
index 46d86fc4..f5934ed2 100755
--- a/scripts/oe-go-mod-fetcher-hybrid.py
+++ b/scripts/oe-go-mod-fetcher-hybrid.py
@@ -515,10 +515,14 @@ def generate_hybrid_files(
515 "" 515 ""
516 ] 516 ]
517 517
518 # Track added vcs_hashes to avoid duplicates when multiple modules
519 # share the same git repo/commit (e.g., errdefs and errdefs/pkg)
520 added_vcs_hashes = set()
518 for mod in sorted(git_modules, key=lambda m: m['module']): 521 for mod in sorted(git_modules, key=lambda m: m['module']):
519 vcs_hash = mod.get('vcs_hash', '') 522 vcs_hash = mod.get('vcs_hash', '')
520 if vcs_hash in vcs_info: 523 if vcs_hash in vcs_info and vcs_hash not in added_vcs_hashes:
521 git_lines.append(vcs_info[vcs_hash]['full_line']) 524 git_lines.append(vcs_info[vcs_hash]['full_line'])
525 added_vcs_hashes.add(vcs_hash)
522 526
523 git_file = output_dir / 'go-mod-hybrid-git.inc' 527 git_file = output_dir / 'go-mod-hybrid-git.inc'
524 git_file.write_text('\n'.join(git_lines) + '\n') 528 git_file.write_text('\n'.join(git_lines) + '\n')