mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
rootfs.py: uninstall the run-postinsts package if not needed
The run-postinsts package runs post installation scripts on target if packages request delayed post installations. When no delayed post installations are found the sysV style scripts are disabled for the package and hence it did not run on sysV based systems. However, the package provides systemd service as well which still ran on systems based on systemd even when no post installations were found. Rather than disabling/masking scripts for different initialization managers we now simply remove/uninstall the run-postinsts package when no post installations are found to be delayed till runtime. This is also more aligned with the function (_uninstall_unneeded) this functionality is triggered through. (From OE-Core rev: 627fb3181edd71502fbdf96549c41b2dea027250) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c5e5ba214a
commit
559b5a892b
@@ -250,13 +250,11 @@ class Rootfs(object, metaclass=ABCMeta):
|
||||
|
||||
|
||||
def _uninstall_unneeded(self):
|
||||
# Remove unneeded init script symlinks
|
||||
# Remove the run-postinsts package if no delayed postinsts are found
|
||||
delayed_postinsts = self._get_delayed_postinsts()
|
||||
if delayed_postinsts is None:
|
||||
if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")):
|
||||
self._exec_shell_cmd(["update-rc.d", "-f", "-r",
|
||||
self.d.getVar('IMAGE_ROOTFS'),
|
||||
"run-postinsts", "remove"])
|
||||
if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")) or os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")):
|
||||
self.pm.remove(["run-postinsts"])
|
||||
|
||||
image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
|
||||
True, False, self.d)
|
||||
|
||||
Reference in New Issue
Block a user