From 82555b8ade3f46ff9ffeec0c8ba139e62983239c Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 29 Jun 2025 22:57:41 +0200 Subject: [PATCH] CI: test_aports_ui: fix systemd + armhf dep case Fix the following error that now appears as the systemd-enabled gnome-keyring package in pmaports will not be built for armhf: main/postmarketos-ui-xfce4/APKBUILD: package 'gnome-keyring' from _pmb_recommends not found for arch 'armhf' This happened, because before this patch pmb.helpers.package.get() would return the pmaports version of the package (!armhf) instead of the one in the binary packages from alpine (alpine one is available for armhf), and then later check the arches of the returned package and fail because it is not enabled for armhf. With the patch, the binary package from alpine repos is returned as the pmaports one is ruled out due to not being available for armhf. The latter arch check is not necessary anymore and gets removed. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6710 --- .ci/testcases/test_ui.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.ci/testcases/test_ui.py b/.ci/testcases/test_ui.py index d005bb1db..520d0d72f 100644 --- a/.ci/testcases/test_ui.py +++ b/.ci/testcases/test_ui.py @@ -26,9 +26,10 @@ def test_aports_ui(): continue for package in apkbuild["_pmb_recommends"]: - depend = pmb.helpers.package.get(package, - arch, must_exist=False) - if depend is None or not pmb.helpers.package.check_arch(package, arch): + depend = pmb.helpers.package.get( + package, arch, must_exist=False, try_other_arches=False + ) + if depend is None: raise RuntimeError(f"{path}: package '{package}' from" f" _pmb_recommends not found for arch '{arch}'") @@ -36,8 +37,9 @@ def test_aports_ui(): if f"{apkbuild['pkgname']}-extras" in apkbuild["subpackages"]: apkbuild = apkbuild["subpackages"][f"{apkbuild['pkgname']}-extras"] for package in apkbuild["_pmb_recommends"]: - depend = pmb.helpers.package.get(package, - arch, must_exist=False) - if depend is None or not pmb.helpers.package.check_arch(package, arch): + depend = pmb.helpers.package.get( + package, arch, must_exist=False, try_other_arches=False + ) + if depend is None: raise RuntimeError(f"{path}: package '{package}' from _pmb_recommends " f"of -extras subpackage is not found for arch '{arch}'")