Fix repology_packages_index.json data correctness (#9966) (#10024)
* Fix repology_packages_index.json data correctness (#9966)
Addresses four issues raised by @AMDmi3 on #9966:
1. Strip alias prefix from version keys ("home:1.2.10" -> "1.2.10")
2. Apply add_urls(...) per-URL version filter when resolving $(version),
so libthai, sqlite3, ace, tao_idl etc. produce working download URLs
3. Skip .git URLs for download_url; preserve them verbatim as
repository_url with the .git suffix intact
4. Strip a leading "v" from emitted versions ("v0.1.30" -> "0.1.30")
Also wraps per-package processing in try{}/catch{} so a broken filter or
unparseable version in one xmake.lua can't abort the whole generator,
and escapes % in the gsub replacement so URL templates returning
URL-encoded payloads (e.g. ACE%2BTAO-...) don't trip the back-reference
parser.
Verified locally on dev tip: 1956 packages, 0 alias-prefixed versions,
0 .git in download_url, 0 unresolved \$(version), 0 v-prefixed versions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Detect "git://" scheme in _is_git_url
Some GNU Savannah-hosted packages (autoconf) declare their git URL as
git://host/path without a trailing ".git", so the previous check missed
them. With this fix, autoconf gains the expected repository_url.
Addresses gemini-code-assist review feedback on #10024.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>