Bug 8978

Summary: devtool: deploy-target: preserve old files so we can restore them later
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 2.1   
Target Milestone: 2.1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Bug Depends on: 7908    
Bug Blocks:    

Description Paul Eggleton 2016-01-21 22:40:46 UTC
When running devtool deploy-target we overwrite any files that were already present on the target. If the target machine isn't running a throw-away image that could be problematic if you were working on some core component of the image. If space allows, we should preserve the files that would have been overwritten and restore them when undeploying. This will need to be done after we move the deployed file list to the target (covered by bug 7908).

As part of this we will also need to add a free space check; at the moment we don't do this. Unfortunately that size check will probably need to be aware that the files being deployed could be across multiple mounted filesystems with separate space pools. 

There should also be an option to skip preserving in case of systems with limited free space where preservation isn't important.