Unregister all binfmt architectures during `pmbootstrap shutdown` (#822)
* Unregister all binfmt architectures during `pmbootstrap shutdown` * Remove `-r, --rootfs` argument from `pmbootstrap build_init` command
This commit is contained in:
parent
df47b50013
commit
732a94fd45
|
@ -91,7 +91,7 @@ def shutdown(args, only_install_related=False):
|
|||
if not only_install_related:
|
||||
# Clean up the rest
|
||||
pmb.helpers.mount.umount_all(args, args.work)
|
||||
arch = args.deviceinfo["arch"]
|
||||
if pmb.parse.arch.cpu_emulation_required(args, arch):
|
||||
pmb.chroot.binfmt.unregister(args, arch)
|
||||
for arch in pmb.config.build_device_architectures:
|
||||
if pmb.parse.arch.cpu_emulation_required(args, arch):
|
||||
pmb.chroot.binfmt.unregister(args, arch)
|
||||
logging.info("Shutdown complete")
|
||||
|
|
|
@ -65,7 +65,7 @@ def _parse_flavor(args):
|
|||
|
||||
|
||||
def _parse_suffix(args):
|
||||
if args.rootfs:
|
||||
if "rootfs" in args and args.rootfs:
|
||||
return "rootfs_" + args.device
|
||||
elif args.buildroot:
|
||||
return "buildroot_" + args.deviceinfo["arch"]
|
||||
|
|
|
@ -189,8 +189,9 @@ def arguments():
|
|||
" to execute inside the chroot. default: sh", nargs='*')
|
||||
for action in [build_init, chroot]:
|
||||
suffix = action.add_mutually_exclusive_group()
|
||||
suffix.add_argument("-r", "--rootfs", action="store_true",
|
||||
help="Chroot for the device root file system")
|
||||
if action == chroot:
|
||||
suffix.add_argument("-r", "--rootfs", action="store_true",
|
||||
help="Chroot for the device root file system")
|
||||
suffix.add_argument("-b", "--buildroot", action="store_true",
|
||||
help="Chroot for building packages for the device "
|
||||
"architecture")
|
||||
|
|
Loading…
Reference in New Issue