-
Notifications
You must be signed in to change notification settings - Fork 402
WIP: distribution: fix epel repo metalinks #4108
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
base: main
Are you sure you want to change the base?
Conversation
| if GenericVersion(context.config.release) >= 10: | ||
| repo_extra_part = "-z" | ||
| else: | ||
| repo_extra_part = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can shorten this a bit
| if GenericVersion(context.config.release) >= 10: | |
| repo_extra_part = "-z" | |
| else: | |
| repo_extra_part = "" | |
| repo_extra_part = "-z" if GenericVersion(context.config.release) >= 10 else "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I forgot about ternary expressions. Will fix that.
| else: | ||
| url = "metalink=https://mirrors.fedoraproject.org/metalink?arch=$basearch" | ||
|
|
||
| if GenericVersion(context.config.release) >= 10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when 11 is released? It'll use the -z suffix as well then, which it probably shouldn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some version parsing functions already in use in the code somewhere, I will see if I can just use those to check for the presence of a minor version.
I think this could already be a problem with just version 10 alone, but that never worked in my tests before (it tries to mix Rocky's 10.1 and EPEL's 10.2 repos and fails) so I can't really confirm.
| yield RpmRepository( | ||
| "epel-testing", | ||
| f"{url}&repo=testing-epel{release}", | ||
| f"{url}&repo=epel{repo_extra_part}-testing-{release}", | ||
| gpgurls, | ||
| enabled=False, | ||
| ) | ||
| yield RpmRepository( | ||
| "epel-testing-debuginfo", | ||
| f"{url}&repo=testing-debug-epel{release}", | ||
| f"{url}&repo=epel{repo_extra_part}-testing-debug-{release}", | ||
| gpgurls, | ||
| enabled=False, | ||
| ) | ||
| yield RpmRepository( | ||
| "epel-testing-source", | ||
| f"{url}&repo=testing-source-epel{release}", | ||
| f"{url}&repo=epel{repo_extra_part}-testing-source-{release}", | ||
| gpgurls, | ||
| enabled=False, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you double checked this also works with centos 9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not think to test older versions, that is a good point. Is there and existing test suite I can just run to check this specific thing or should I write my own? Also if I have to write my own (I am assuming a handful of mkosi.conf files is enough) is there a good place to put that, so that future problems can be detected sooner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration test system is in dire need of a revamp, so a manual test will suffice for now.
This commit fixes the EPEL repository meta-links.
There where two problems:
10.1instead of just10)The links can be confirmed by looking in the
/etc/yum.repos.d/epel.repoand/etc/yum.repos.d/epel-testing.repofiles on a system with theepel-releasepackage installed.The changes can be tested with this
mkosi.conf: