Merge lp:~danilo/linaro-license-protection/sanitized-tree into lp:~linaro-automation/linaro-license-protection/trunk
Status: | Merged |
---|---|
Merged at revision: | 115 |
Proposed branch: | lp:~danilo/linaro-license-protection/sanitized-tree |
Merge into: | lp:~linaro-automation/linaro-license-protection/trunk |
Diff against target: |
356 lines (+236/-86) 3 files modified
scripts/linaroscript.py (+63/-0) scripts/make-sanitized-tree-copy.py (+96/-0) scripts/update-deployment.py (+77/-86) |
To merge this branch: | bzr merge lp:~danilo/linaro-license-protection/sanitized-tree |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stevan Radaković | Approve | ||
Review via email: mp+120889@code.launchpad.net |
Description of the change
Use the functionality of SnapshotsPublisher to create a sanitized copy of
an entire tree. We rely on shutil.copy2 and shutil.copystat to ensure
appropriate flags are transferred as well.
We ignore errors and simply log them. This will result in them coming to our inboxes via linaro-
The script simply prints out the destination directory when done (all other output goes to stderr). The idea is to use this and store it in an environment variable and then pass it to rsync to copy from mombin (production) to kahaku (staging).
I am still not sure if it'd be better to leave the temp dir creation to the script caller as well. Makes for slightly more complicated wrapper script, but probably not by much. What do you think?
This also extracts some of the common bits (like supporting multiple -v options to increase verbosity of the logger output, and configuration of the logger) out into a separate class and shares it with update-deployment script (the changes in update-deployment are very minor: mostly reindentation and additions of "self." where appropriate).
This looks good. Temp directory creation should be left here, IMO.
It might make sense to change my validation script to extend the linaroscript class as well..
Approve +1.