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