From be9aab895b90e7c9d5f4cc5aa0bba07415f28aad Mon Sep 17 00:00:00 2001 From: David Wronek Date: Sun, 15 May 2022 16:51:53 +0200 Subject: [PATCH] pmb.install: Check for alpine-conf version (MR 2182) Upstream Alpine change the way how `setup-timezone` works, it no longer uses the `-z` argument to change the timezone. --- pmb/install/_install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index ef36a23b..c6537fed 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -995,7 +995,14 @@ def create_device_rootfs(args, step, steps): setup_keymap(args) # Set timezone - pmb.chroot.root(args, ["setup-timezone", "-z", args.timezone], suffix) + arch = args.deviceinfo["arch"] + package = pmb.helpers.package.get(args, "alpine-conf", arch) + version = package["version"].split("-r")[0] + + if not pmb.parse.version.check_string(version, ">=3.14.0"): + pmb.chroot.root(args, ["setup-timezone", "-z", args.timezone], suffix) + else: + pmb.chroot.root(args, ["setup-timezone", args.timezone], suffix) # Set locale if locale_is_set: