Fedora 41 embraces the transition to DNF5 package manager

The FESCo (Fedora Engineering Steering Committee), responsible for the technical part of the development of the Fedora Linux distribution, approved involvement the default DNF5 package manager in the fall release of Fedora 41. The dnf, libdnf, and dnf-cutomatic packages will be replaced in Fedora 41 by the DNF5 toolkit and the new libdnf5 library, and the /usr/bin/dnf symlink will begin pointing to the dnf5 executable.

Despite the fact that full parity in functionality with the old tools has not yet been achieved, the developers believe that the distribution is ready for migration, and the missing features can be implemented later. For example, while unavailable functionality related to history management transactions, which is the basis of the “dnf history” command. Also not completed working on integrating support for the dnf5daemon background process into the GNOME Software application manager. Requires additional testing of the mechanism for updating the entire system to the next release (system-upgrade command).

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: