The Fedora 41 release proposes to default the distribution to the DNF5 package manager. Originally, the transition to DNF5 was planned for Fedora 39, but the migration was postponed due to unprepared tooling. Although full functional parity with the old tooling has not yet been achieved, developers believe that the distribution is ready for migration, and missing features can be implemented later. The proposal has not yet been reviewed by the FESCo (Fedora Engineering Steering Committee), which is responsible for the technical aspects of Fedora development. If the proposal is accepted, the dnf, libdnf, and dnf-cutomatic packages will be replaced with the DNF5 tooling and the new libdnf5 library, and the symbolic link /usr/bin/dnf will start pointing to the dnf5 executable.
In its time, DNF replaced the Yum package manager in the distribution, which was entirely written in Python. In DNF, performance-critical low-level functions were rewritten and moved to separate C libraries: hawkey, librepo, libsolv, and libcomps, while the framework and high-level components remained in Python. The DNF5 project aims to unify the existing low-level libraries, rewrite the remaining package management components in C++, and extract the core functionality into a separate libdnf5 library, creating a wrapper around this library to maintain the Python API.
Using C++ instead of Python has eliminated a large number of dependencies, reduced the size of the tooling, and increased performance. Higher performance is achieved not only through compilation to machine code but also due to an improved implementation of the transaction table, optimized repository loading, and restructuring of the database (separating the system state databases and operation history). The DNF5 tooling is independent of PackageKit, which has been replaced by a new background process called DNF Daemon, taking over PackageKit's functionality and providing an interface for managing packages and updates in graphical environments.
The overhaul has also made it possible to implement some improvements that enhance the usability of the package manager. For instance, the new DNF features a more visual indication of operation progress; it adds support for local RPM packages in transactions; it allows reports on completed transactions to display information provided by scripts embedded in the packages (scriplets); and it proposes an advanced input auto-completion system for bash.
Source: opennet.ru
