Ben Cotton, Fedora Program Manager at Red Hat, announced plans to switch Fedora Linux to the DNF5 package manager by default. In Fedora Linux 39, the dnf, libdnf, and dnf-automatic packages will be replaced with the DNF5 toolkit and the new libdnf5 library. The proposal has not yet been reviewed by the FESCo (Fedora Engineering Steering Committee), which is responsible for the technical aspects of Fedora distribution development.
At one point, DNF replaced Yum, which was entirely written in Python. In DNF, performance-sensitive low-level functions were rewritten and moved to separate C libraries—hawkey, librepo, libsolv, and libcomps—but 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 move the core functionality into a separate libdnf5 library, creating a wrapper around this library to maintain the Python API.
Using C++ instead of Python will eliminate a significant number of dependencies, reduce the toolkit's size, and improve performance. The enhanced performance is achieved not only through compilation to machine code but also through an improved transaction table implementation, optimized repository loading, and a restructuring of the database (separating the system state and operation history databases). The DNF5 toolkit is free from the PackageKit dependency, replaced with a new background process, the DNF Daemon, which takes over PackageKit's functionality and provides an interface for managing packages and updates in graphical environments.
The redesign will also enable new enhancements that improve usability with the package manager. For example, the new DNF features clearer progress indicators for ongoing operations; support for using local RPM packages for transactions; the ability to display information from scripts embedded in packages (scriplets) in transaction reports; and a more advanced autocomplete system for bash.
Source: opennet.ru
