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/debian.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'repos/debian.py') diff --git a/repos/debian.py b/repos/debian.py index db93b2e..44fc3a2 100644 --- a/repos/debian.py +++ b/repos/debian.py @@ -47,23 +47,26 @@ def parse_cached(cached: Path) -> Mapping[str, Version]: def build_repo(name: str, dist: str, section: str, arch: str = 'all') -> Repository: url = f'https://deb.debian.org/debian/dists/{dist}/{section}/binary-{arch}/Packages.gz' + if arch != 'all': + section = f'{section}/{arch}' return Repository( family='Debian', repo=name, + section=section, index_url=url, parse=parse_cached, ) -buster_main_all = build_repo('10 - Buster (main)', 'buster', 'main') -buster_main_amd64 = build_repo('10 - Buster (main/amd64)', 'buster', 'main', 'amd64') -buster_contrib_all = build_repo('10 - Buster (contrib)', 'buster', 'contrib') -buster_contrib_amd64 = build_repo('10 - Buster (contrib/amd64)', 'buster', 'contrib', 'amd64') -buster_non_free_all = build_repo('10 - Buster (non-free)', 'buster', 'non-free') -buster_non_free_amd64 = build_repo('10 - Buster (non-free/amd64)', 'buster', 'non-free', 'amd64') +buster_main_all = build_repo('10 - Buster', 'buster', 'main') +buster_main_amd64 = build_repo('10 - Buster', 'buster', 'main', 'amd64') +buster_contrib_all = build_repo('10 - Buster', 'buster', 'contrib') +buster_contrib_amd64 = build_repo('10 - Buster', 'buster', 'contrib', 'amd64') +buster_non_free_all = build_repo('10 - Buster', 'buster', 'non-free') +buster_non_free_amd64 = build_repo('10 - Buster', 'buster', 'non-free', 'amd64') -testing_main_all = build_repo('Testing (main)', 'testing', 'main') -testing_main_amd64 = build_repo('Testing (main/amd64)', 'testing', 'main', 'amd64') -testing_contrib_all = build_repo('Testing (contrib)', 'testing', 'contrib') -testing_contrib_amd64 = build_repo('Testing (contrib/amd64)', 'testing', 'contrib', 'amd64') -testing_non_free_all = build_repo('Testing (non-free)', 'testing', 'non-free') -testing_non_free_amd64 = build_repo('Testing (non-free/amd64)', 'testing', 'non-free', 'amd64') +testing_main_all = build_repo('Testing', 'testing', 'main') +testing_main_amd64 = build_repo('Testing', 'testing', 'main', 'amd64') +testing_contrib_all = build_repo('Testing', 'testing', 'contrib') +testing_contrib_amd64 = build_repo('Testing', 'testing', 'contrib', 'amd64') +testing_non_free_all = build_repo('Testing', 'testing', 'non-free') +testing_non_free_amd64 = build_repo('Testing', 'testing', 'non-free', 'amd64') -- cgit v1.2.3