diff options
| -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) |
