Workaround for Qemu aarch64 abuild-tar bug (#907)

See also: <https://github.com/postmarketOS/pmbootstrap/issues/546>
This commit is contained in:
Oliver Smith 2017-11-15 22:28:10 +00:00 committed by GitHub
parent c50ecd7c5a
commit 4c7793e766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 86 additions and 2 deletions

View file

@ -20,6 +20,7 @@ import os
import logging
import glob
import pmb.build
import pmb.config
import pmb.chroot
import pmb.chroot.apk
@ -83,5 +84,11 @@ def init(args, suffix="native"):
pmb.chroot.root(args, ["sed", "-i", "-e", "s/^CLEANUP=.*/CLEANUP=''/",
"/etc/abuild.conf"], suffix)
# Qemu workaround (aarch64 only)
arch = pmb.parse.arch.from_chroot_suffix(args, suffix)
emulate = pmb.parse.arch.cpu_emulation_required(args, arch)
if emulate and arch == "aarch64":
pmb.build.qemu_workaround_aarch64(args, suffix)
# Mark the chroot as initialized
pmb.chroot.root(args, ["touch", marker], suffix)