Bug 4976 - Add flag for package to signal reboot is required after installation
Summary: Add flag for package to signal reboot is required after installation
Status: NEW
Alias: None
Product: Package Management Issues
Classification: Runtime
Component: package-management-issues (show other bugs)
Version: 1.4.1
Hardware: x86 Multiple
: Low enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-08-03 17:52 UTC by Bryan Evenson
Modified: 2025-04-17 15:03 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Evenson 2013-08-03 17:52:52 UTC
Some packages, when installed for the first time or when upgraded, require the system to be rebooted for the new package features to take affect.  At this time, there is no standard manner for a package to notify the system that it needs to be rebooted.  This enhancement would provide a consistent manner for the system to discover if a reboot is required after an upgrade or new package installation.

A suggested manner would be to add a flag, such as NEEDS_REBOOT or whatever name makes sense, to a recipe for a package that needs the system to reboot for changes to take affect.  If this flag is set, then the following text is added to the end of the package's pkg_postinst():

#!/bin/sh
touch /var/run/reboot-required
echo ${PN} >>/var/run/reboot-required.pkgs

The application responsible for package installation or upgrade can then check for the existence of /var/run/reboot-required to see if the system needs to be rebooted.  The /var/run/reboot-required.pkgs file provides a list of all packages requesting the reboot to show the end user if desired.
Comment 1 Richard Purdie 2025-04-17 15:03:22 UTC
Rather than a variable, a bbclass might be a easier way to indicate it.