forked from Mirror/pmbootstrap
pmb.helpers.frontend.kconfig: modernize (MR 2333)
Create new pmb/commands/kconfig_check.py and _edit.py files and move related code there.
This commit is contained in:
parent
6f6cf1e8da
commit
b6058e3569
4 changed files with 90 additions and 60 deletions
|
@ -16,6 +16,8 @@ from .repo_bootstrap import RepoBootstrap
|
|||
from .shutdown import Shutdown
|
||||
from .test import Test
|
||||
from .pull import Pull
|
||||
from .kconfig_check import KConfigCheck
|
||||
from .kconfig_edit import KConfigEdit
|
||||
|
||||
"""New way to model pmbootstrap subcommands that can be invoked without PmbArgs."""
|
||||
|
||||
|
@ -24,7 +26,6 @@ unmigrated_commands = [
|
|||
"init",
|
||||
"work_migrate",
|
||||
"repo_missing",
|
||||
"kconfig",
|
||||
"export",
|
||||
"sideload",
|
||||
"netboot",
|
||||
|
@ -75,6 +76,10 @@ def run_command(args: PmbArgs):
|
|||
command = Test(args.action_test)
|
||||
elif args.action == "pull":
|
||||
command = Pull()
|
||||
elif args.action == "kconfig" and args.action_kconfig == "check":
|
||||
command = KConfigCheck(args.kconfig_check_details, args.file, args.package)
|
||||
elif args.action == "kconfig" and args.action_kconfig in ["edit", "migrate"]:
|
||||
command = KConfigEdit(args.package, args.action_kconfig == "migrate")
|
||||
else:
|
||||
raise NotImplementedError(f"Command '{args.action}' is not implemented.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue