pmb/chroot/binfmt: always install qemu- binary (MR 2088)
gitlab runners seem to be registering binfmt now (?), so this fixes an issue where register() might return immediately because the OS (or ??) took care of registration, but the qemu-<arch> binary wasn't added to the chroot.
This commit is contained in:
parent
8447629f3c
commit
db12e987d0
|
@ -18,10 +18,15 @@ def register(args, arch):
|
|||
Get arch, magic, mask.
|
||||
"""
|
||||
arch_qemu = pmb.parse.arch.alpine_to_qemu(arch)
|
||||
|
||||
# always make sure the qemu-<arch> binary is installed, since registering
|
||||
# may happen outside of this method (e.g. by OS)
|
||||
if f"qemu-{arch_qemu}" not in pmb.chroot.apk.installed(args):
|
||||
pmb.chroot.apk.install(args, ["qemu-" + arch_qemu])
|
||||
|
||||
if is_registered(arch_qemu):
|
||||
return
|
||||
pmb.helpers.other.check_binfmt_misc(args)
|
||||
pmb.chroot.apk.install(args, ["qemu-" + arch_qemu])
|
||||
|
||||
# Don't continue if the actions from check_binfmt_misc caused the OS to
|
||||
# automatically register the target arch
|
||||
|
|
Loading…
Reference in New Issue