forked from Mirror/pmbootstrap
pmb/helpers/frontend: drop all --flavors args (MR 2093)
This commit is contained in:
parent
ca7ac4c704
commit
1d5030738c
3 changed files with 5 additions and 25 deletions
|
@ -82,8 +82,6 @@ def frontend(args):
|
||||||
suffix = f"rootfs_{args.device}"
|
suffix = f"rootfs_{args.device}"
|
||||||
flavors = pmb.chroot.other.kernel_flavors_installed(args, suffix)
|
flavors = pmb.chroot.other.kernel_flavors_installed(args, suffix)
|
||||||
flavor = flavors[0]
|
flavor = flavors[0]
|
||||||
if hasattr(args, "flavor") and args.flavor:
|
|
||||||
flavor = args.flavor
|
|
||||||
|
|
||||||
# Handle initfs actions
|
# Handle initfs actions
|
||||||
action = args.action_initfs
|
action = args.action_initfs
|
||||||
|
|
|
@ -43,14 +43,7 @@ def _parse_flavor(args, autoinstall=True):
|
||||||
flavors = pmb.chroot.other.kernel_flavors_installed(
|
flavors = pmb.chroot.other.kernel_flavors_installed(
|
||||||
args, suffix, autoinstall)
|
args, suffix, autoinstall)
|
||||||
|
|
||||||
# Parse and verify the flavor argument
|
# Parse and verify flavor
|
||||||
flavor = args.flavor
|
|
||||||
if flavor:
|
|
||||||
if flavor not in flavors:
|
|
||||||
raise RuntimeError(f"No kernel installed with flavor {flavor}!" +
|
|
||||||
" Run 'pmbootstrap flasher list_flavors' to"
|
|
||||||
" get a list.")
|
|
||||||
return flavor
|
|
||||||
if not len(flavors):
|
if not len(flavors):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"No kernel flavors installed in chroot " + suffix + "! Please let"
|
"No kernel flavors installed in chroot " + suffix + "! Please let"
|
||||||
|
|
|
@ -88,8 +88,6 @@ def arguments_install(subparser):
|
||||||
# Image type "--android-recovery-zip" related
|
# Image type "--android-recovery-zip" related
|
||||||
group = ret.add_argument_group("optional image type 'android-recovery-zip'"
|
group = ret.add_argument_group("optional image type 'android-recovery-zip'"
|
||||||
" arguments")
|
" arguments")
|
||||||
group.add_argument("--flavor", help="kernel flavor to include in recovery"
|
|
||||||
" flashable zip", default=None)
|
|
||||||
group.add_argument("--recovery-install-partition", default="system",
|
group.add_argument("--recovery-install-partition", default="system",
|
||||||
help="partition to flash from recovery (e.g."
|
help="partition to flash from recovery (e.g."
|
||||||
" 'external_sd')",
|
" 'external_sd')",
|
||||||
|
@ -174,7 +172,6 @@ def arguments_export(subparser):
|
||||||
ret.add_argument("--odin", help="odin flashable tar"
|
ret.add_argument("--odin", help="odin flashable tar"
|
||||||
" (boot.img/kernel+initramfs only)",
|
" (boot.img/kernel+initramfs only)",
|
||||||
action="store_true", dest="odin_flashable_tar")
|
action="store_true", dest="odin_flashable_tar")
|
||||||
ret.add_argument("--flavor", default=None)
|
|
||||||
ret.add_argument("--no-install", dest="autoinstall", default=True,
|
ret.add_argument("--no-install", dest="autoinstall", default=True,
|
||||||
help="skip updating kernel/initfs", action="store_false")
|
help="skip updating kernel/initfs", action="store_false")
|
||||||
return ret
|
return ret
|
||||||
|
@ -213,7 +210,6 @@ def arguments_flasher(subparser):
|
||||||
boot.add_argument("--cmdline", help="override kernel commandline")
|
boot.add_argument("--cmdline", help="override kernel commandline")
|
||||||
flash_kernel = sub.add_parser("flash_kernel", help="flash a kernel")
|
flash_kernel = sub.add_parser("flash_kernel", help="flash a kernel")
|
||||||
for action in [boot, flash_kernel]:
|
for action in [boot, flash_kernel]:
|
||||||
action.add_argument("--flavor", default=None)
|
|
||||||
action.add_argument("--no-install", dest="autoinstall", default=True,
|
action.add_argument("--no-install", dest="autoinstall", default=True,
|
||||||
help="skip updating kernel/initfs",
|
help="skip updating kernel/initfs",
|
||||||
action="store_false")
|
action="store_false")
|
||||||
|
@ -277,17 +273,10 @@ def arguments_initfs(subparser):
|
||||||
" for example: 'debug-shell'")
|
" for example: 'debug-shell'")
|
||||||
|
|
||||||
# ls, build, extract
|
# ls, build, extract
|
||||||
ls = sub.add_parser("ls", help="list initramfs contents")
|
sub.add_parser("ls", help="list initramfs contents")
|
||||||
build = sub.add_parser("build", help="(re)build the initramfs")
|
sub.add_parser("build", help="(re)build the initramfs")
|
||||||
extract = sub.add_parser(
|
sub.add_parser("extract",
|
||||||
"extract",
|
help="extract the initramfs to a temporary folder")
|
||||||
help="extract the initramfs to a temporary folder")
|
|
||||||
for action in [ls, build, extract]:
|
|
||||||
action.add_argument(
|
|
||||||
"--flavor",
|
|
||||||
default=None,
|
|
||||||
help="name of the kernel flavor (run 'pmbootstrap flasher"
|
|
||||||
" list_flavors' to get a list of all installed flavors")
|
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue