diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/rootfs.py')
| -rw-r--r-- | scripts/lib/wic/plugins/source/rootfs.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index c08f7600ce..e438158f34 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
| @@ -81,8 +81,9 @@ class RootfsPlugin(SourcePlugin): | |||
| 81 | raise WicError("Couldn't find --rootfs-dir=%s connection or " | 81 | raise WicError("Couldn't find --rootfs-dir=%s connection or " |
| 82 | "it is not a valid path, exiting" % part.rootfs_dir) | 82 | "it is not a valid path, exiting" % part.rootfs_dir) |
| 83 | 83 | ||
| 84 | real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) | 84 | part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) |
| 85 | 85 | ||
| 86 | new_rootfs = None | ||
| 86 | # Handle excluded paths. | 87 | # Handle excluded paths. |
| 87 | if part.exclude_path is not None: | 88 | if part.exclude_path is not None: |
| 88 | # We need a new rootfs directory we can delete files from. Copy to | 89 | # We need a new rootfs directory we can delete files from. Copy to |
| @@ -92,9 +93,7 @@ class RootfsPlugin(SourcePlugin): | |||
| 92 | if os.path.lexists(new_rootfs): | 93 | if os.path.lexists(new_rootfs): |
| 93 | shutil.rmtree(os.path.join(new_rootfs)) | 94 | shutil.rmtree(os.path.join(new_rootfs)) |
| 94 | 95 | ||
| 95 | copyhardlinktree(real_rootfs_dir, new_rootfs) | 96 | copyhardlinktree(part.rootfs_dir, new_rootfs) |
| 96 | |||
| 97 | real_rootfs_dir = new_rootfs | ||
| 98 | 97 | ||
| 99 | for orig_path in part.exclude_path: | 98 | for orig_path in part.exclude_path: |
| 100 | path = orig_path | 99 | path = orig_path |
| @@ -123,6 +122,5 @@ class RootfsPlugin(SourcePlugin): | |||
| 123 | # Delete whole directory. | 122 | # Delete whole directory. |
| 124 | shutil.rmtree(full_path) | 123 | shutil.rmtree(full_path) |
| 125 | 124 | ||
| 126 | part.rootfs_dir = real_rootfs_dir | ||
| 127 | part.prepare_rootfs(cr_workdir, oe_builddir, | 125 | part.prepare_rootfs(cr_workdir, oe_builddir, |
| 128 | real_rootfs_dir, native_sysroot) | 126 | new_rootfs or part.rootfs_dir, native_sysroot) |
