Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement logic to check whether package requires system reboot #587

Closed
1 task done
evan-goode opened this issue Jun 1, 2023 · 0 comments · Fixed by #887
Closed
1 task done

Implement logic to check whether package requires system reboot #587

evan-goode opened this issue Jun 1, 2023 · 0 comments · Fixed by #887
Assignees
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@evan-goode
Copy link
Member

evan-goode commented Jun 1, 2023

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 includes systemd, kernel, and glibc.

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.

  • Open a discussion with fedora-devel
@evan-goode evan-goode added Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Jun 5, 2023
@evan-goode evan-goode self-assigned this Jun 5, 2023
evan-goode added a commit to evan-goode/dnf5 that referenced this issue Aug 31, 2023
Reboot is suggested for a transaction if any of the involved packages is
EITHER (1) part of a hardcoded set of "core" packages (including kernel
and systemd) OR (2) has an associated advisory with
reboot_suggested=True.

For rpm-software-management#587
github-merge-queue bot pushed a commit that referenced this issue Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant