From d401a04bb0fe91109054e490fdb7b43ff8eb4b40 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 12 Jan 2024 17:56:18 +0100 Subject: [PATCH] Add a repology link to each package There is no way to override the mapping and no version info, we just re-use the mapping repology has for our packages. But it's a start. --- app/appstate.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/appstate.py b/app/appstate.py index f225eb6..1c64cfb 100644 --- a/app/appstate.py +++ b/app/appstate.py @@ -493,6 +493,13 @@ def external_infos(self) -> Sequence[tuple[ExtId, ExtInfo]]: ext.append((ext_id, infos[realname])) break + # XXX: let repology do the mapping for us + repology_repo = "msys2_msys2" if self._package.repo == "msys" else "msys2_mingw" + ext.append(( + ExtId("repology", "Repology", True), + ExtInfo(self.realname, "", 0, + f"https://repology.org/tools/project-by?repo={quote(repology_repo)}&name_type=srcname&target_page=project_versions&name={quote(self.name)}", {}))) + return sorted(ext) @property