Skip to content

Commit

Permalink
rootfs: Conditionally uninstall update-rc.d
Browse files Browse the repository at this point in the history
update-rc.d is now needed by systemd to interact with sysv
scripts, so if we have a mixed system, then we can not uninstall
update-rc.d as it is going to break systemd functionality, we check for
sysvinit and sytemd in distro and also ensure that its not building an
image with readonly rootfs

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Sep 9, 2015
1 parent 56c5fa1 commit e4c7096
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion meta/lib/oe/rootfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ def _uninstall_unneeded(self):

runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
True, False, self.d)
sysvcompat_in_distro = bb.utils.contains("DISTRO_FEATURES", [ "systemd", "sysvinit" ],
True, False, self.d)
image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
True, False, self.d)
if sysvcompat_in_distro and not image_rorfs:
pkg_to_remove = ""
else:
pkg_to_remove = "update-rc.d"
if not runtime_pkgmanage:
# Remove components that we don't need if we're not going to install
# additional packages at runtime
Expand All @@ -242,7 +250,7 @@ def _uninstall_unneeded(self):
pkg = pkg_installed.split()[0]
if pkg in ["base-passwd",
"shadow",
"update-alternatives",
"update-alternatives", pkg_to_remove,
self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
]:
pkgs_to_remove.append(pkg)
Expand Down

0 comments on commit e4c7096

Please sign in to comment.