summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/rootfs.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index be9761c0d9..e884e47733 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -121,10 +121,23 @@ class Rootfs(object):
121 121
122 delayed_postinsts = self._get_delayed_postinsts() 122 delayed_postinsts = self._get_delayed_postinsts()
123 if delayed_postinsts is None: 123 if delayed_postinsts is None:
124 self.pm.remove(["update-rc.d", 124 installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
125 "base-passwd", 125 pkgs_to_remove = list()
126 self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)], 126 with open(installed_pkgs_dir, "r+") as installed_pkgs:
127 False) 127 pkgs_installed = installed_pkgs.read().split('\n')
128 for pkg_installed in pkgs_installed[:]:
129 pkg = pkg_installed.split()[0]
130 if pkg in ["update-rc.d",
131 "base-passwd",
132 self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
133 ]:
134 pkgs_to_remove.append(pkg)
135 pkgs_installed.remove(pkg_installed)
136
137 if len(pkgs_to_remove) > 0:
138 self.pm.remove(pkgs_to_remove, False)
139 # Update installed_pkgs.txt
140 open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
128 141
129 if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")): 142 if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts")):
130 self._exec_shell_cmd(["update-rc.d", "-f", "-r", 143 self._exec_shell_cmd(["update-rc.d", "-f", "-r",