From 6465a6aa87f0b8ab9576a2d01269d1fb58eba608 Mon Sep 17 00:00:00 2001 From: Frieder Hannenheim <friederhannenheim@riseup.net> Date: Sun, 9 Mar 2025 19:28:06 +0100 Subject: [PATCH] sideload: get channel from package not from global pmaports (MR 2569) Currently packages that are not in the systemd channel cannot be sideloaded when using the systemd channel. This is because apk sideload uses the global aports channel and not the channel of the package. Fix it with this patch. --- pmb/sideload/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pmb/sideload/__init__.py b/pmb/sideload/__init__.py index db9c1f410..b28c7ebc1 100644 --- a/pmb/sideload/__init__.py +++ b/pmb/sideload/__init__.py @@ -108,7 +108,6 @@ def sideload( :param pkgnames: list of pkgnames to be built""" paths = [] - channel: str = pmb.config.pmaports.read_config()["channel"] if arch is None: arch = ssh_find_arch(args, user, host, port) @@ -121,8 +120,12 @@ def sideload( if data_repo is None: raise RuntimeError(f"Couldn't find APKINDEX data for {pkgname}!") + base_aports, _ = pmb.build.get_apkbuild(pkgname) + channel = pmb.config.pmaports.read_config(base_aports)["channel"] + apk_file = f"{pkgname}-{data_repo.version}.apk" host_path = context.config.work / "packages" / channel / arch / apk_file + if not host_path.is_file(): to_build.append(pkgname) -- GitLab