diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-09-06 15:08:15 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-11 23:28:36 +0100 |
commit | 21fffdeea3ac5a84dcfc753665cb1df4625c0b2a (patch) | |
tree | 4012e8888fcce45fd86e493afda5f4348fdf67ee /meta/lib/oe/rootfs.py | |
parent | 4cccac9af0d3d63c24c04639b5910c526a2d43eb (diff) | |
download | poky-21fffdeea3ac5a84dcfc753665cb1df4625c0b2a.tar.gz |
rootfs: Conditionally uninstall update-rc.d
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
(From OE-Core rev: 5dd5b8adc225d5c703d85fc0187ae65ff6067b58)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r-- | meta/lib/oe/rootfs.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 2372226e78..3b53fce4ae 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -230,6 +230,14 @@ class Rootfs(object): | |||
230 | 230 | ||
231 | runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management", | 231 | runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management", |
232 | True, False, self.d) | 232 | True, False, self.d) |
233 | sysvcompat_in_distro = bb.utils.contains("DISTRO_FEATURES", [ "systemd", "sysvinit" ], | ||
234 | True, False, self.d) | ||
235 | image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", | ||
236 | True, False, self.d) | ||
237 | if sysvcompat_in_distro and not image_rorfs: | ||
238 | pkg_to_remove = "" | ||
239 | else: | ||
240 | pkg_to_remove = "update-rc.d" | ||
233 | if not runtime_pkgmanage: | 241 | if not runtime_pkgmanage: |
234 | # Remove components that we don't need if we're not going to install | 242 | # Remove components that we don't need if we're not going to install |
235 | # additional packages at runtime | 243 | # additional packages at runtime |
@@ -243,7 +251,7 @@ class Rootfs(object): | |||
243 | if pkg in ["update-rc.d", | 251 | if pkg in ["update-rc.d", |
244 | "base-passwd", | 252 | "base-passwd", |
245 | "shadow", | 253 | "shadow", |
246 | "update-alternatives", | 254 | "update-alternatives", pkg_to_remove, |
247 | self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True) | 255 | self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True) |
248 | ]: | 256 | ]: |
249 | pkgs_to_remove.append(pkg) | 257 | pkgs_to_remove.append(pkg) |