partially "fix" no_kmod not being set on call of _process_kernel_version #358
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The error when still having an (invalid) kernel-version while having no-kmod set is highly unintuitive.
I ran into it while scripting and had to look at the code to have any chance figuring it out.
The code of _process_kernel_version accounts for this, generating ample warnings and also ignoring --kernel-versions and building successfully, iff when it is called, no_kmod is already set. Which in my case it was not.
This "fixes" the issue partially, only when --no-kmod is set as an argument. It remains broken when no_kmod is set in ugrd.toml and versions as a flag (as happened in my case).
It also changes the output of
--help.The proper fix would be some kind of priority system, that ensures no_kmod is fully loaded and handled before any flag relying on it is.
Consider this a bug report