Skip to content

boot-qemu.py: Use tuples for Linux and QEMU versions#78

Merged
nathanchance merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:use-tuples-for-versions
Dec 2, 2022
Merged

boot-qemu.py: Use tuples for Linux and QEMU versions#78
nathanchance merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:use-tuples-for-versions

Conversation

@nathanchance

Copy link
Copy Markdown
Member

There is no reason to roll our own versioning format when we can
automatically generate tuples for the versions to allow more natural and
obvious comparisons, similar to sys.version_info. For example:

    if qemu_ver_code < 602050:

vs.

    if qemu_ver < (6, 2, 50):

There is no reason to roll our own versioning format when we can
automatically generate tuples for the versions to allow more natural and
obvious comparisons, similar to sys_version_info. For example:

    if qemu_ver_code < 602050:

vs.

    if qemu_ver < (6, 2, 50):

Signed-off-by: Nathan Chancellor <nathan@kernel.org>

@msfjarvis msfjarvis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@nathanchance nathanchance merged commit 9ef7866 into ClangBuiltLinux:main Dec 2, 2022
@nathanchance nathanchance deleted the use-tuples-for-versions branch December 2, 2022 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants