-
Notifications
You must be signed in to change notification settings - Fork 6
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
add attribute version_number #9
Comments
I'm curious whether issue #4 or similar wouldn't affect mock if used like this? |
This is trivial to do --- a/fedora_distro_aliases/__init__.py
+++ b/fedora_distro_aliases/__init__.py
@@ -79,7 +79,9 @@ class Distro(Munch):
Create a `Distro` object from Bodhi `release`
"""
keys = ["name", "long_name", "version", "state", "branch", "id_prefix"]
- return cls({k: getattr(release, k) for k in keys})
+ distro = cls({k: getattr(release, k) for k in keys})
+ distro.version_number = distro.version
+ return distro
@property
def product(self): I can send a PR right now. However ... having the version as a number for rawhide was the default, we intentionally changed the number to "rawhide" # The Fedora with the highest version is "rawhide", but
# Bodhi always uses release names, and has no concept of "rawhide".
fedora[-1].update({
"name": "Rawhide",
"long_name": "Fedora Rawhide",
"version": "rawhide",
"branch": "rawhide",
}) Hopefully that wasn't a mistake. If it was, we can probably still change it. But we would need to figure out another way to generate Mock chroot names. |
Fix rpm-software-management#9 For example for Fedora Rawhide that would mean that `distro.version` will be `"rawhide"` and `distro.version_number` will be e.g. `"41"`.
Fix rpm-software-management#9 For example for Fedora Rawhide that would mean that `distro.version` will be `"rawhide"` and `distro.version_number` will be e.g. `"41"`.
Fix #9 For example for Fedora Rawhide that would mean that `distro.version` will be `"rawhide"` and `distro.version_number` will be e.g. `"41"`.
I want to add new attribute to release dict that would be name
version_number
. It would be the same asversion
except for rawhide there was the number. I.e. currently 41 instead ofrawhide
.My motivation is to use it in situation like this rpm-software-management/mock#1342 where we need to know version of current rawhide to map it to current gpg key.
If you are ok with the name of the attribute I will create a PR.
The text was updated successfully, but these errors were encountered: