forked from Mirror/pmbootstrap
chroot: replace arch.from_chroot_suffix() with chroot.arch (MR 2252)
Another usage of args dropped! Although the device_arch variable thing is not very ideal... Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
8526631589
commit
fa804c9453
9 changed files with 29 additions and 19 deletions
|
@ -14,18 +14,6 @@ def alpine_native():
|
|||
return machine_type_to_alpine(machine)
|
||||
|
||||
|
||||
def from_chroot_suffix(args: PmbArgs, chroot: Chroot) -> str:
|
||||
if chroot == Chroot.native():
|
||||
return pmb.config.arch_native
|
||||
if chroot.name() == args.device:
|
||||
return args.deviceinfo["arch"]
|
||||
if chroot.type == ChrootType.BUILDROOT:
|
||||
return chroot.name()
|
||||
|
||||
raise ValueError(f"Invalid chroot suffix: {chroot}"
|
||||
" (wrong device chosen in 'init' step?)")
|
||||
|
||||
|
||||
def alpine_to_qemu(arch):
|
||||
"""
|
||||
Convert the architecture to the string used in the QEMU packaging.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue