Skip to content
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

Split $releasever to $releasever_major and $releasever_minor #1989

Conversation

evan-goode
Copy link
Member

Whenever the releasever substitution variable is set, automatically derive and set the releasever_major and releasever_minor vars by splitting releasever on the first ".".

Companion to the DNF 5 implementation here: rpm-software-management/dnf5#800. This implementation is kept similar to the implementation in DNF 5, including the caveat/potentially breaking change that setting a substitution variable can now raise an exception. If we don't want to raise an error, a simple solution would be simply to allow setting of $releasever_major and $releasever_minor and take out the ReadOnlyVariableError.

DNF 5 issue: rpm-software-management/dnf5#710

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346, but merging this does not close the bug yet; the shell-style variable expansion still needs to be implemented.

@pep8speaks
Copy link

pep8speaks commented Sep 18, 2023

Hello @evan-goode! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-09-20 19:07:27 UTC

Whenever the `releasever` substitution variable is set, automatically
derive and set the `releasever_major` and `releasever_minor` vars by
splitting `releasever` on the first ".".

Companion to the DNF 5 implementation here: rpm-software-management/dnf5#800

DNF 5 issue: rpm-software-management/dnf5#710

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
@evan-goode evan-goode force-pushed the evan-goode/releasever-major-minor branch from 2b9dc56 to 24085eb Compare September 20, 2023 19:07
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Oct 9, 2023
This functionality is also implemented in DNF 4, but direct consumers of
libdnf (PackageKit, microdnf) also need it.

DNF 4 PR: rpm-software-management/dnf#1989

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Oct 11, 2023
This functionality is also implemented in DNF 4, but direct consumers of
libdnf (PackageKit, microdnf) also need it.

DNF 4 PR: rpm-software-management/dnf#1989

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
evan-goode added a commit to evan-goode/libdnf that referenced this pull request Oct 11, 2023
This functionality is also implemented in DNF 4, but direct consumers of
libdnf (PackageKit, microdnf) also need it.

DNF 4 PR: rpm-software-management/dnf#1989

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
Conan-Kudo pushed a commit to rpm-software-management/libdnf that referenced this pull request Oct 11, 2023
This functionality is also implemented in DNF 4, but direct consumers of
libdnf (PackageKit, microdnf) also need it.

DNF 4 PR: rpm-software-management/dnf#1989

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
@Conan-Kudo Conan-Kudo merged commit 2c1a388 into rpm-software-management:master Oct 11, 2023
3 checks passed
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.

None yet

3 participants