Fix GoalPrivate::operator= not resetting resolve-time members
GoalPrivate::operator= was missing resets for several members that were added after the original implementation. Most critically, transaction_user_installed and transaction_group_reason bitmaps were never reset, causing ‘Id is out of bitmap range’ crashes when Goal::resolve() was called multiple times in the same session (e.g. via dnf5daemon-server when gnome-software installs multiple local RPMs).
The fix aligns operator= with the copy constructor:
- Reset resolve-time artifacts (transaction_group_reason, transaction_user_installed)
- Copy input pointers (exclude_from_weak, user_installed_packages)
- Reset resolve-time state (clean_deps_present, groups, environments, reason_changes)
Fixes: https://github.com/rpm-software-management/dnf5/issues/2756 Assisted-by: GitHub Copilot
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
DNF5
DNF5 is a command-line package manager that automates the process of installing, upgrading, configuring, and removing computer programs in a consistent manner. It supports RPM packages, modulemd modules, and comps groups and environments.
As part of the DNF5 stack, libdnf is the package management library. It was originally written to support the DNF package manager, but gradually grew up into a versatile library. You can now use libdnf to build custom tools that load repositories, query packages, resolve dependencies, and install packages.
DNF5 is also powered with the libsolv library which provides an easy to use programming interface.
By using DNF5, you can work with the following artifacts:
DNF5 is written in C++ and it can interface with the following programming languages:
Note, however, that DNF5 cannot yet interface with the following programming languages:
Join us on IRC at
#dnfon Libera.Chat. Questions should be asked there, issues discussed. Remember:#dnfis not a support channel, and prior research is expected from the questioner.Installing DNF5
DNF5 is available since Fedora 38. To install the DNF5 package manager, use either of the following commands, depending on your Fedora release:
sudo dnf copr enable rpmsoftwaremanagement/dnf-nightly && sudo dnf install dnf5[^dnf-nightly]sudo dnf install dnf5Note:
dnf-nightlyprovides nightly builds for the entire DNF stack. Once you enable this repository you will start receiving updates for DNF, libdnf, and for the other packages of the stack.Documentation
Contributing to the DNF5 project
For details about how to contribute to the DNF5 project, see CONTRIBUTING.md.
Reporting issues
To report an issue (except of issues in the translations), use either of the following methods:
To report an issue in the translated messages:
Developing DNF5 by building and testing the code
For details about building and testing DNF5, see the Development environment setup section.
Translating
Translating DNF5 from English to other languages happens at Fedora Weblate translation web site.
A GitHub workflow extracts new English messages from this repository every day and commits them to dnf5-l10n repository. The translation web site then presents them to its users who translate them there and the web site saves the finished translations back to the dnf5-l10n repository. Finally, the translation catalogs from that repository are copied into this repository just before every DNF5 release.
License
For more details about licenses, see COPYING.