Implement logic to check whether package requires system reboot #587
Labels
Priority: MEDIUM
Triaged
Someone on the DNF 5 team has read the issue and determined the next steps to take
DNF 4 has
base.reboot_needed(): bool
which checks whether a system reboot is recommended following the transaction. In DNF 4, the logic is very crude, this function simply checks the set of packages involved in the transaction against a hardcoded set of "important" packages which includessystemd
,kernel
, andglibc
.In DNF 5, we should investigate better ways to do this check. jmracek proposed using the
<reboot_suggested>True</reboot_suggested>
advisory, which I think is the best approach, but has the disadvantage that advisories are mostly only supported by RHEL and Fedora repos. I'm not sure how someone would flag a package in their COPR repository as "needs reboot".Another idea is to examine the files changed in the transaction and use some heuristic to make a decision. Or some combination of these three methods (hardcoded list, advisories, checking files).
This logic will be needed for the DNF 5 needs-restarting plugin (#389) and by the
reboot
option, if we choose to keep it, in whatever replaces DNF automatic (#57).API users may also want to use this functionality, see https://bugzilla.redhat.com/show_bug.cgi?id=2164835.
The text was updated successfully, but these errors were encountered: