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
Define dnf4/dnf5 selection preference and ensure internal consistency #82930
Comments
Files identified in the description: If these files are incorrect, please update the |
I believe this was already done for the initial Currently users can use the following in their tasks:
ansible/lib/ansible/module_utils/facts/system/pkg_mgr.py Lines 71 to 82 in c12d425
As for the Python binding presence, the presence of
We don't/shouldn't fall back to anything ever. This fails when executing
All these are handled correctly (??? as intended :) ) by design by inspecting the Thoughts? |
Summary
The
dnf5
change entry for Fedora 41 was recently updated, and it clarifies some open questions we had around what the final state of side-by-sidednf4
/dnf5
CLI andlibdnf
will look like when dnf5 becomes the default package manager in F41+.In light of this information, we'll need to take another pass over our dnf5 support to ensure things behave in a reasonable fashion.
Issue Type
Feature Idea
Component Name
dnf
Additional Information
TL;DR from the change entry, it sounds like
/usr/bin/dnf
will be pointed todnf5
,libdnf5
will keep the5
in its name, andlibdnf
will continue to refer to thednf4
version (if present). At least for upgrades, thednf4
CLI andlibdnf
will remain present. It's unclear from the change entry if fresh installs will be dnf5-only, but I would assume so. Regardless, oncednf5
is present (at least in an F41+ env), it should always be preferred. The RPMDB is the shared source of truth between dnf4/dnf5, but metadata that is not part of RPMDB (eg explicit install vs implicit dep tracking) will be siloed by each dnf impl. A best-effort migration of the existing dnf4 DB will apparently be attempted the first time dnf5 is actually used, but after that, the two are completely independent.We'll need to decide what our final package manager selection heuristic and fallback will be, and ensure that it's implemented consistently between facts, the
dnf
shim action plugin, and the module(s) to ensure that we're always talking to the correct implementation. A few possibilities:dnf5
overdnf4
if present, regardless of distro/version.dnf
version is the system default package manager by inspecting/running/usr/bin/dnf
(or via PATH) and default the fact/plugin values accordingly.In any case, we'll need to ensure that whatever behavior we choose behaves consistently, since the logic is somewhat distributed between facts and the
dnf
shim action. Some of the cases we'll want to ensure are being tested:dnf5
/libdnf5
present, butlibdnf5
Python bindings are missing (should not fall back to dnf4)libdnf5
present butdnf5
is not (?)There will also apparently be some interim side-tags made available to test the new functionality before it becomes the default in rawhide- we should check that out when it's available...
Code of Conduct
The text was updated successfully, but these errors were encountered: