diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/oe-go-mod-fetcher.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/oe-go-mod-fetcher.py b/scripts/oe-go-mod-fetcher.py index 13399a73..5c866928 100755 --- a/scripts/oe-go-mod-fetcher.py +++ b/scripts/oe-go-mod-fetcher.py | |||
| @@ -3929,7 +3929,14 @@ def generate_recipe(modules: List[Dict], source_dir: Path, output_dir: Optional[ | |||
| 3929 | 3929 | ||
| 3930 | # Trust the ref_hint from discovery - it will be validated/corrected during | 3930 | # Trust the ref_hint from discovery - it will be validated/corrected during |
| 3931 | # the verification pass if needed (e.g., force-pushed tags are auto-corrected) | 3931 | # the verification pass if needed (e.g., force-pushed tags are auto-corrected) |
| 3932 | # BUT: for pseudo-versions, Go's Origin.Ref is the "nearest tag" used to derive | ||
| 3933 | # the pseudo-version, NOT a tag that points to this commit. Using it as a tag= | ||
| 3934 | # in SRC_URI causes BitBake to resolve the tag to a different commit and fail. | ||
| 3932 | ref_hint = module.get('vcs_ref', '') | 3935 | ref_hint = module.get('vcs_ref', '') |
| 3936 | version = module.get('version', '') | ||
| 3937 | if ref_hint and parse_pseudo_version_tag(version): | ||
| 3938 | # Pseudo-version: the vcs_ref is the base tag, not a ref pointing to this commit | ||
| 3939 | ref_hint = '' | ||
| 3933 | 3940 | ||
| 3934 | entry = repo_info['commits'][commit_hash] | 3941 | entry = repo_info['commits'][commit_hash] |
| 3935 | entry['modules'].append(module) | 3942 | entry['modules'].append(module) |
| @@ -3951,6 +3958,9 @@ def generate_recipe(modules: List[Dict], source_dir: Path, output_dir: Optional[ | |||
| 3951 | vcs_url = module['vcs_url'] | 3958 | vcs_url = module['vcs_url'] |
| 3952 | commit_hash = module['vcs_hash'] | 3959 | commit_hash = module['vcs_hash'] |
| 3953 | ref_hint = module.get('vcs_ref', '') | 3960 | ref_hint = module.get('vcs_ref', '') |
| 3961 | # For pseudo-versions, vcs_ref is the nearest tag, not a ref pointing to this commit | ||
| 3962 | if ref_hint and parse_pseudo_version_tag(module.get('version', '')): | ||
| 3963 | ref_hint = '' | ||
| 3954 | 3964 | ||
| 3955 | print(f" • verifying [{index}/{total_modules}] {module['module_path']}@{module['version']} -> {commit_hash[:12]}") | 3965 | print(f" • verifying [{index}/{total_modules}] {module['module_path']}@{module['version']} -> {commit_hash[:12]}") |
| 3956 | 3966 | ||
