New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vng: override kconfig with '--force' #96
Conversation
Should we also force the update when diff --git a/virtme_ng/run.py b/virtme_ng/run.py
index c6b0468..a9fd566 100644
--- a/virtme_ng/run.py
+++ b/virtme_ng/run.py
@@ -157,7 +157,7 @@ def make_parser():
"--kconfig",
"-k",
action="store_true",
- help="Only generate the kernel .config without building/running anything",
+ help="Only override the kernel .config without building/running anything",
)
parser.add_argument(
@@ -562,11 +562,11 @@ class KernelSource:
dry_run=args.dry_run,
)
- def config(self, args):
+ def config(self, args, force):
"""Perform a make config operation on a kernel source directory."""
arch = args.arch
cmd = "virtme-configkernel --defconfig"
- if not args.force:
+ if not args.force and not force:
cmd += " --no-update"
if arch is not None:
if arch not in ARCH_MAPPING:
@@ -1102,9 +1102,9 @@ def checkout(kern_source, args):
@spinner_decorator(message="🔧 configuring kernel")
-def config(kern_source, args):
+def config(kern_source, args, force):
"""Configure the kernel."""
- kern_source.config(args)
+ kern_source.config(args, force)
return True
@@ -1155,7 +1155,7 @@ def do_it() -> int:
elif args.build or args.kconfig:
if args.commit:
checkout(kern_source, args)
- config(kern_source, args)
+ config(kern_source, args, args.kconfig)
if args.kconfig:
return 0
make(kern_source, args) I don't know when
|
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>
Hm... I'm not really convinced about this. I feel like we're going to break some workflows. At this point I'd rather prefer to introduce a new In this way your example becomes more clear I think:
What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in the PR looks good to me. Thanks!
We would break it only for those launching
I find it a bit confusing to have |
Yeah, I'm almost convinced. Moreover looking at the help that we provide:
It seems pretty clear that Ok, feel free to update this PR or create a new one to do this change if you have time. Thanks! |
It seems counter-intuitive not to do anything when 'vng --kconfig' is called and a .config file is present. So now, the .config is overridden when the '--kconfig' option is passed. Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Good, thank you!
Just did! |
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: @arighi