In Fedora 41 release proposed switch the default distribution to the DNF5 package manager. Initially, the migration to DNF5 was planned for the Fedora 39 release, but the migration was delayed due to the unavailability of the tooling. Despite the fact that full parity in functionality with the old tools has still not been achieved, the developers believe that the distribution is ready for migration, and the missing features can be implemented later. The proposal has not yet been considered by the FESCo (Fedora Engineering Steering Committee), which is responsible for the technical part of the development of the Fedora distribution. If the proposal is accepted, the dnf, libdnf and dnf-cutomatic packages will be replaced by the DNF5 toolkit and the new libdnf5 library, and the /usr/bin/dnf symlink will begin to point to the dnf5 executable.
At one time, DNF replaced the Yum package manager in the distribution, which was written entirely in Python. In DNF, performance-intensive low-level functions were rewritten and moved into separate C libraries hawkey, librepo, libsolv and libcomps, but the framework and high-level components remained in Python. The DNF5 project is aimed at unifying existing low-level libraries, rewriting the remaining package management components in Python in C++, and moving the basic functionality into a separate library libdnf5 with the creation of a wrapper around this library to save the Python API.
Using C++ instead of Python allowed us to get rid of a large number of dependencies, reduce the size of the toolkit, and improve productivity. Higher performance is achieved not only through the use of compilation into machine code, but also through improved implementation of the transaction table, optimization of loading from repositories and database restructuring (databases with system state and operation history are separated). The DNF5 toolkit is decoupled from PackageKit in favor of a new background process called DNF Daemon, which replaces PackageKit functionality and provides an interface for managing packages and updates in graphical environments.
The rework also made it possible to implement some improvements that improve the usability of the package manager. For example, the new DNF provides a more visual indication of the progress of operations; added support for using local RPM packages for transactions; added the ability to display in reports on completed transactions information produced by scripts built into packages; A more advanced input completion system for bash has been proposed.
Thanks for reading: