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
config: do not stop if the .config
file is present
#91
Conversation
I like the idea to overwrite the config with To avoid breaking this case the default behavior should be to not touch the .config if it exists. How about introducing a separate option for |
OK, I think I understand your concern. The behaviour of I guess my modification might be a problem only for people using One last thing, if I understand the code correctly, and linked to what I wrote in my first commit, if It feels like something is missing here. Should |
I like the idea to warn the user if the config is not touched when I'm also not opposed to introduce a new In general I think the behavior should be the following:
What do you think? |
Thank you for your reply.
It sounds good to me. Technically, would it then be OK to have these options:
|
Otherwise, the 'virtme-configkernel --update' command doesn't really make sense if it doesn't update an existing kernel config file. Note that 'vng -b' and 'vng -k' will call 'virtme-configkernel --update'. It is not clear if the kconfig update is skipped on purpose or not, but it looks confusing not to do anything. Fixes: 6ade5a7 ("virtme: improve configkernel") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
When '--defconfig' is used (or --allnoconfig), the kernel config is supposed to be overridden. It was only done if there was no .config file. Now the kernel config is always overridden if asked. Fixes: 6ade5a7 ("virtme: improve configkernel") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
The '--update' option of virtme-configkernel is there to "update existing config for virtme" according to the help message. vng was calling 'virtme-configkernel --update', but the goal was not to modify the config file if it was present, just in case it has been modified in between two build calls. To support that, the '--update' option had been modified ... not to update the config file if it was present, in contradiction with the option name and its 'help' text. A new '--no-update' parameter is now available: if the config file exists, nothing is done. 'vng' is then now calling: virtme-configkernel --defconfig --no-update So if the config file exists, the config is not modified, but a message is now printed in stdout (only visible when vng is used with --verbose). Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
I added a Please note that if the |
I think it's ok to print the message to stdout, it's supposed to be the expected behavior. Maybe we could pass Something like this:
What do you think? Anyway, this looks good to me and we can work on other improvements in tree. Thanks! |
👍
Good idea! Sorry, I didn't get before you were talking about
Yes, it looks good to me! If you did the modification, I guess you will commit it? Or do you prefer if I open a new PR?
Thanks! |
@matttbe feel free to create a new PR for that. Otherwise I'll create it later today. |
virtme-configkernel
didn't do anything if the.config
file was present, even when launched with--update
.Now, it always updates it with the given config, and it overrides it if asked (e.g.
--defconfig
).