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.
This commit is contained in:
David Wronek 2022-05-15 16:51:53 +02:00
parent 9901cb31ea
commit be9aab895b
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 8 additions and 1 deletions

View File

@ -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: