summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-28 12:29:25 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:46:19 +0100
commitd4e60fe6a41b2a04bc1af81e54da6e35f7ed4386 (patch)
tree688015bc42a00d5c52aa2d737ca8c6fc473d0610
parent5541191b9987ea194bcb55a913cf92f6f3679b42 (diff)
downloadpoky-d4e60fe6a41b2a04bc1af81e54da6e35f7ed4386.tar.gz
wic: rootfs: fix rootfs path reporting
wic gets rootfs paths from partition object property 'rootfs_dir' and shows them in final report. rootfs plugin sets this property to the temporary path, which causes temporary paths appearing in the report. Changed the code to prevent storing temporary rootfs path in part.rootfs_dir. This should fix the report. (From OE-Core rev: 28d2d7d6f79df08431187c7debaab2a3fa516671) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py10
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)