From 7591c0f54fa3272df0f6b7057f6096bb513e9328 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 12 Apr 2021 12:12:16 -0600 Subject: give sections a separate thing --- repos/alpine_linux.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'repos/alpine_linux.py') diff --git a/repos/alpine_linux.py b/repos/alpine_linux.py index 7c646cc..2714f48 100644 --- a/repos/alpine_linux.py +++ b/repos/alpine_linux.py @@ -57,17 +57,18 @@ def parse_cached(cached: Path) -> Mapping[str, Version]: apkindex_file = TextIOWrapper(apkindex_file) return parse_apkindex(apkindex_file) -def build_repo(name: str, url_path: str) -> Repository: +def build_repo(name: str, section: str, url_path: str) -> Repository: url = f'http://dl-cdn.alpinelinux.org/alpine/{url_path}/APKINDEX.tar.gz' return Repository( family='Alpine Linux', repo=name, + section=section, index_url=url, parse=parse_cached, ) -stable_main_x86_64 = build_repo('Stable (main/x86_64)', 'latest-stable/main/x86_64') -stable_community_x86_64 = build_repo('Stable (community/x86_64)', 'latest-stable/community/x86_64') -edge_main_x86_64 = build_repo('Edge (main/x86_64)', 'edge/main/x86_64') -edge_community_x86_64 = build_repo('Edge (community/x86_64)', 'edge/community/x86_64') -edge_testing_x86_64 = build_repo('Edge (testing/x86_64)', 'edge/testing/x86_64') +stable_main_x86_64 = build_repo('Stable', 'main/x86_64', 'latest-stable/main/x86_64') +stable_community_x86_64 = build_repo('Stable', 'community/x86_64', 'latest-stable/community/x86_64') +edge_main_x86_64 = build_repo('Edge', 'main/x86_64', 'edge/main/x86_64') +edge_community_x86_64 = build_repo('Edge', 'community/x86_64', 'edge/community/x86_64') +edge_testing_x86_64 = build_repo('Edge', 'testing/x86_64', 'edge/testing/x86_64') -- cgit v1.2.3