summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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:45:12 +0100
commit28d2d7d6f79df08431187c7debaab2a3fa516671 (patch)
treedaf0342b83c15654ac67bc9e93e0c811fd5464d9 /scripts/lib
parenta1c83cebe986e211dfc31be5cbd748f53fc298df (diff)
downloadopenembedded-core-contrib-28d2d7d6f79df08431187c7debaab2a3fa516671.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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-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):
raise WicError("Couldn't find --rootfs-dir=%s connection or "
"it is not a valid path, exiting" % part.rootfs_dir)
- real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
+ part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
+ new_rootfs = None
# Handle excluded paths.
if part.exclude_path is not None:
# We need a new rootfs directory we can delete files from. Copy to
@@ -92,9 +93,7 @@ class RootfsPlugin(SourcePlugin):
if os.path.lexists(new_rootfs):
shutil.rmtree(os.path.join(new_rootfs))
- copyhardlinktree(real_rootfs_dir, new_rootfs)
-
- real_rootfs_dir = new_rootfs
+ copyhardlinktree(part.rootfs_dir, new_rootfs)
for orig_path in part.exclude_path:
path = orig_path
@@ -123,6 +122,5 @@ class RootfsPlugin(SourcePlugin):
# Delete whole directory.
shutil.rmtree(full_path)
- part.rootfs_dir = real_rootfs_dir
part.prepare_rootfs(cr_workdir, oe_builddir,
- real_rootfs_dir, native_sysroot)
+ new_rootfs or part.rootfs_dir, native_sysroot)
>240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339