Skip to content

Commit

Permalink
vng: override kconfig with '--force'
Browse files Browse the repository at this point in the history
By default, vng --build and --kconfig will not modify existing kconfig,
even if new kconfig files are given. The idea is to let people modifying
them manually.

It is now possible to force the modification of the kconfig by using
'--force'.

Suggested-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
  • Loading branch information
matttbe committed Mar 19, 2024
1 parent 739793a commit 0f936c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions virtme_ng/run.py
Expand Up @@ -408,7 +408,8 @@ def make_parser():
"--force",
action="store_true",
help="Force reset git repository to target branch or commit "
"(warning: this may drop uncommitted changes)",
"(warning: this may drop uncommitted changes), "
"and force kernel config override",
)

parser.add_argument(
Expand Down Expand Up @@ -565,7 +566,9 @@ def checkout(self, args):
def config(self, args):
"""Perform a make config operation on a kernel source directory."""
arch = args.arch
cmd = "virtme-configkernel --defconfig --no-update"
cmd = "virtme-configkernel --defconfig"
if not args.force:
cmd += " --no-update"
if arch is not None:
if arch not in ARCH_MAPPING:
arg_fail(f"unsupported architecture: {arch}")
Expand Down

0 comments on commit 0f936c6

Please sign in to comment.