C API: Detect releasever_major, releasever_minor from provides#1691
Merged
kontura merged 2 commits intorpm-software-management:dnf-4-masterfrom Feb 10, 2025
Conversation
kontura
reviewed
Feb 5, 2025
releasever_major and releasever_minor can now be overridden by virtual provides on the system-release package (any of `DISTROVERPKG`). The detection of releasever is unchanged. releasever_major and releasever_minor are specified by the versions of the `system-release-major` and `system-release-minor` provides, respectively. Introduces dnf_context_set_release_ver_major and dnf_context_set_release_ver_minor.
…litting Introduces dnf_context_get_release_ver_major and dnf_context_get_release_ver_minor.
0a089c1 to
d52fcb3
Compare
b963950
into
rpm-software-management:dnf-4-master
7 of 11 checks passed
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.
libdnf C API parity with rpm-software-management/dnf#2198.
Adds four new API functions:
dnf_context_get_release_ver_majordnf_context_get_release_ver_minordnf_context_set_release_ver_majordnf_context_set_release_ver_minorChanges
dnf_context_set_os_releaseto checksystem-release(releasever_major)andsystem-release(releasever_minor). Luckily, unlike with the newdetect_releaseversin the DNF 4 Python API, callers ofdnf_context_set_os_releasewon't need to switch to a new function sincednf_context_set_os_releasedetects the releasever variables and sets them by side effect.For https://issues.redhat.com/browse/RHEL-76498.