dnf5 version 5.2.17.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.17.0 libdnf5 plugin API version 2.2 name: needs_restarting version: 1.0.0 API version: 2.0 Fedora 43 This sometimes works and sometimes does not. What works: dnf needs-restarting dnf needs-restarting --services sudo -E dnf needs-restarting What doesn't always work: sudo dnf needs-restarting sudo dnf needs-restarting --services sudo dnf needs-restarting --reboothint When the command with sudo fail, running without sudo functions correctly. What doesn't work: sudo -E dnf needs-restarting --services It returns [System.Error.ENOTCONN] Failed to flush bus on opening (Transport endpoint is not connected) Similar to: https://bugzilla.redhat.com/show_bug.cgi?id=2419668 Reproducible: Sometimes Steps to Reproduce: 1. sudo dnf upgrade with a kernel or systemd upgrade 2. Before rebooting, sudo dnf needs-restarting. 3. If it indicates: A reboot is necessary: run sudo dnf needs-restarting --reboothint or run dnf needs-restarting Then re-run sudo dnf needs-restarting when it fails it will indicate: No core libraries or services have been updated since boot-up. Reboot should not be necessary. sudo dnf needs-restarting --services appears to also fail in a similar manner. Actual Results: No core libraries or services have been updated since boot-up. Reboot should not be necessary. Is returned when there are packages or services that have been updated that require reboot. Expected Results: sudo dnf needs-restarting returns: Core libraries or services have been updated since boot-up: When the packages/services needing reboot https://github.com/rpm-software-management/dnf5/blob/835466a88172148780b5937d49da54fbcae34144/libdnf5/rpm/package_query.cpp#L3018 are modified. Additional Information: https://github.com/rpm-software-management/dnf5/issues/2562
*** Bug 2419668 has been marked as a duplicate of this bug. ***