Fix missing ifdefs when only one architecture is affected#196
Merged
vmezzela merged 1 commit intoSUSE:develfrom Feb 16, 2026
Merged
Fix missing ifdefs when only one architecture is affected#196vmezzela merged 1 commit intoSUSE:develfrom
vmezzela merged 1 commit intoSUSE:develfrom
Conversation
fgyanz
approved these changes
Feb 11, 2026
Collaborator
fgyanz
left a comment
There was a problem hiding this comment.
LGTM! Tested with a different livepatch too.
vmezzela
reviewed
Feb 12, 2026
klpbuild/klplib/utils.py
Outdated
| conf_archs.update(val) | ||
|
|
||
| return sorted(conf_archs) | ||
| return set(sorted(conf_archs)) |
Collaborator
There was a problem hiding this comment.
conf_archs is already a set before we call sorted() on it, which transforms it into a sorted list. Instead of converting it back to a set(), we'd have the same result if we return straight away conf_arch.
or am I missing something?
Collaborator
Author
There was a problem hiding this comment.
In my tests, it created a set already sorted in this case. Without the set created here, it fails to compare the set's in the templ code.
Collaborator
There was a problem hiding this comment.
but two sets are be equal no matter their order: doing set(sorted(set())), has not effect.
That's why I am proposing to return directly conf_arch, that is already a set.
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
b384a62 to
a891969
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For one livepatch I found that there were missing ifdefs for an ACPI file, which is weird because only x86_64 has CONFIG_ACPI set. This now makes sure that we add ifdefs if the CONFIG_ entries are not the same as cs.get_default_archs().