diff options
-rw-r--r-- | meta/lib/oe/rootfs.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index dddbef4d64..ebdae7e6e1 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -130,11 +130,19 @@ class Rootfs(object): | |||
130 | self._cleanup() | 130 | self._cleanup() |
131 | 131 | ||
132 | def _uninstall_uneeded(self): | 132 | def _uninstall_uneeded(self): |
133 | # Remove unneeded init script symlinks | ||
134 | delayed_postinsts = self._get_delayed_postinsts() | ||
135 | if delayed_postinsts is None: | ||
136 | if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")): | ||
137 | self._exec_shell_cmd(["update-rc.d", "-f", "-r", | ||
138 | self.d.getVar('IMAGE_ROOTFS', True), | ||
139 | "run-postinsts", "remove"]) | ||
140 | |||
141 | # Remove unneeded package-management related components | ||
133 | if base_contains("IMAGE_FEATURES", "package-management", | 142 | if base_contains("IMAGE_FEATURES", "package-management", |
134 | True, False, self.d): | 143 | True, False, self.d): |
135 | return | 144 | return |
136 | 145 | ||
137 | delayed_postinsts = self._get_delayed_postinsts() | ||
138 | if delayed_postinsts is None: | 146 | if delayed_postinsts is None: |
139 | installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt') | 147 | installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt') |
140 | pkgs_to_remove = list() | 148 | pkgs_to_remove = list() |
@@ -154,10 +162,6 @@ class Rootfs(object): | |||
154 | # Update installed_pkgs.txt | 162 | # Update installed_pkgs.txt |
155 | open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed)) | 163 | open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed)) |
156 | 164 | ||
157 | if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")): | ||
158 | self._exec_shell_cmd(["update-rc.d", "-f", "-r", | ||
159 | self.d.getVar('IMAGE_ROOTFS', True), | ||
160 | "run-postinsts", "remove"]) | ||
161 | else: | 165 | else: |
162 | self._save_postinsts() | 166 | self._save_postinsts() |
163 | 167 | ||