diff options
| -rw-r--r-- | meta/lib/oe/rootfs.py | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index c004a5b5dd..a2af3325ee 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
| @@ -239,26 +239,27 @@ class Rootfs(object): | |||
| 239 | pkg_to_remove = "" | 239 | pkg_to_remove = "" |
| 240 | else: | 240 | else: |
| 241 | pkg_to_remove = "update-rc.d" | 241 | pkg_to_remove = "update-rc.d" |
| 242 | if not runtime_pkgmanage: | 242 | if image_rorfs: |
| 243 | # Remove components that we don't need if we're not going to install | 243 | # Remove components that we don't need if it's a read-only rootfs |
| 244 | # additional packages at runtime | 244 | pkgs_installed = image_list_installed_packages(self.d) |
| 245 | if delayed_postinsts is None: | 245 | pkgs_to_remove = list() |
| 246 | pkgs_installed = image_list_installed_packages(self.d) | 246 | for pkg in pkgs_installed.split(): |
| 247 | pkgs_to_remove = list() | 247 | if pkg in ["update-rc.d", |
| 248 | for pkg in pkgs_installed.split(): | 248 | "base-passwd", |
| 249 | if pkg in ["update-rc.d", | 249 | "shadow", |
| 250 | "base-passwd", | 250 | "update-alternatives", pkg_to_remove, |
| 251 | "shadow", | 251 | self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True) |
| 252 | "update-alternatives", pkg_to_remove, | 252 | ]: |
| 253 | self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True) | 253 | pkgs_to_remove.append(pkg) |
| 254 | ]: | 254 | |
| 255 | pkgs_to_remove.append(pkg) | 255 | if len(pkgs_to_remove) > 0: |
| 256 | 256 | self.pm.remove(pkgs_to_remove, False) | |
| 257 | if len(pkgs_to_remove) > 0: | 257 | |
| 258 | self.pm.remove(pkgs_to_remove, False) | 258 | if delayed_postinsts: |
| 259 | 259 | self._save_postinsts() | |
| 260 | else: | 260 | if image_rorfs: |
| 261 | self._save_postinsts() | 261 | bb.warn("There are post install scripts " |
| 262 | "in a read-only rootfs") | ||
| 262 | 263 | ||
| 263 | post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True) | 264 | post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True) |
| 264 | execute_pre_post_process(self.d, post_uninstall_cmds) | 265 | execute_pre_post_process(self.d, post_uninstall_cmds) |
