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

C API: Detect releasever_major, releasever_minor from provides #1691

Conversation

evan-goode
Copy link
Member

@evan-goode evan-goode commented Feb 3, 2025

libdnf C API parity with rpm-software-management/dnf#2198.

Adds four new API functions:

  • dnf_context_get_release_ver_major
  • dnf_context_get_release_ver_minor
  • dnf_context_set_release_ver_major
  • dnf_context_set_release_ver_minor

Changes dnf_context_set_os_release to check system-release(releasever_major) and system-release(releasever_minor). Luckily, unlike with the new detect_releasevers in the DNF 4 Python API, callers of dnf_context_set_os_release won't need to switch to a new function since dnf_context_set_os_release detects the releasever variables and sets them by side effect.

For https://issues.redhat.com/browse/RHEL-76498.

@kontura kontura self-assigned this Feb 4, 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.
@evan-goode evan-goode force-pushed the evan-goode/provide-releasever-major-minor branch from 0a089c1 to d52fcb3 Compare February 7, 2025 16:57
@kontura kontura merged commit b963950 into rpm-software-management:dnf-4-master Feb 10, 2025
7 of 11 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.

2 participants