diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/wic/plugins/source/rootfs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index f1db83f8a1..afb1eb9202 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
| @@ -199,17 +199,20 @@ class RootfsPlugin(SourcePlugin): | |||
| 199 | if not os.path.lexists(full_path): | 199 | if not os.path.lexists(full_path): |
| 200 | continue | 200 | continue |
| 201 | 201 | ||
| 202 | if new_pseudo: | ||
| 203 | pseudo = cls.__get_pseudo(native_sysroot, new_rootfs, new_pseudo) | ||
| 204 | else: | ||
| 205 | pseudo = None | ||
| 202 | if path.endswith(os.sep): | 206 | if path.endswith(os.sep): |
| 203 | # Delete content only. | 207 | # Delete content only. |
| 204 | for entry in os.listdir(full_path): | 208 | for entry in os.listdir(full_path): |
| 205 | full_entry = os.path.join(full_path, entry) | 209 | full_entry = os.path.join(full_path, entry) |
| 206 | if os.path.isdir(full_entry) and not os.path.islink(full_entry): | 210 | rm_cmd = "rm -rf %s" % (full_entry) |
| 207 | shutil.rmtree(full_entry) | 211 | exec_native_cmd(rm_cmd, native_sysroot, pseudo) |
| 208 | else: | ||
| 209 | os.remove(full_entry) | ||
| 210 | else: | 212 | else: |
| 211 | # Delete whole directory. | 213 | # Delete whole directory. |
| 212 | shutil.rmtree(full_path) | 214 | rm_cmd = "rm -rf %s" % (full_path) |
| 215 | exec_native_cmd(rm_cmd, native_sysroot, pseudo) | ||
| 213 | 216 | ||
| 214 | part.prepare_rootfs(cr_workdir, oe_builddir, | 217 | part.prepare_rootfs(cr_workdir, oe_builddir, |
| 215 | new_rootfs or part.rootfs_dir, native_sysroot, | 218 | new_rootfs or part.rootfs_dir, native_sysroot, |
