Prefer the VERSION_CODENAME field of os-release to parsing it from VERSION#230
Merged
nir0s merged 1 commit intopython-distro:masterfrom Feb 2, 2019
Merged
Conversation
cf4147f to
767de74
Compare
Just for the record, we also merged this for F28 and F29, so anyone with a fully up-to-date system will have the correct empty VERSION_CODENAME as well. |
…RSION Preferring the codename field lets distributions accurately encode their codename preferences instead of us having to parse them from the VERSION in ways that may be error prone. This came up in two known instances: * Ubuntu 16.04 has a VERSION string of "16.04.1 LTS (Xenial Xerces)" and a VERSION_CODENAME of "xenial". distro was mistakenly returning "xenial xerces" because of the way the VERSION string was formatted. * Fedora 21+ do not have a code name. Our parser was returning the variant because Fedora sticks the variant in parenthesis in the VERSION field. Fedora 28+ will add an empty VERSION_CODENAME field so that we can recognize they do not have a code name: https://src.fedoraproject.org/rpms/fedora-release/pull-request/58#
767de74 to
7190724
Compare
Contributor
Author
|
Updated the commit message to reflect that this PR will correct the codename on Fedora 28 and greater. |
Collaborator
Collaborator
|
Hmm. Having given it some more thought, it seems like merging #186 will take a while. I'll merge this, and once the inconsistencies framework is in, we'll move this. |
Contributor
Author
|
Cool. Makes sense to me. |
This was referenced Feb 12, 2022
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.
Preferring the codename field lets distributions accurately encode their
codename preferences instead of us having to parse them from the VERSION
in ways that may be error prone.
This came up in two known instances:
and a VERSION_CODENAME (Actually UBUNTU_CODENAME because this was before Ubuntu adopted the standard) of "xenial". distro was mistakenly returning
"xenial xerces" because of the way the VERSION string was formatted.
variant because Fedora sticks the variant in parenthesis in the
VERSION field. Fedora
30+28+ will add an empty VERSION_CODENAME field sothat we can recognize they do not have a code name.