From a8988872b6c24223b4c430d6cf1337fe27d22352 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Tue, 1 Jul 2025 08:28:59 -0700 Subject: [PATCH] pmb.helpers.apk_static: fix version check for apk3 ipdb> p version_bin '3.0.0_rc5_git20250613-r0' ipdb> p version '3.0.0_rc5_git20250613-r0' Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2635 --- pmb/helpers/apk_static.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/helpers/apk_static.py b/pmb/helpers/apk_static.py index c31fc4cc..f767932f 100644 --- a/pmb/helpers/apk_static.py +++ b/pmb/helpers/apk_static.py @@ -138,7 +138,7 @@ def extract(version: str, apk_path: Path) -> None: os.chmod(temp_path, os.stat(temp_path).st_mode | stat.S_IEXEC) version_bin = pmb.helpers.run.user_output([temp_path, "--version"]) version_bin = version_bin.split(" ")[1].split(",")[0] - if not version.startswith(f"{version_bin}-r"): + if not version.startswith(f"{version_bin}"): os.unlink(temp_path) raise RuntimeError( f"Downloaded apk-tools-static-{version}.apk,"