[virt-tools-list] [virt-bootstrap] [PATCH v6 02/26] untar: Improve command
Radostin Stoyanov
rstoyanov1 at gmail.com
Thu Aug 17 09:39:40 UTC 2017
Add the flag "--absolute-names" to disable the strip of leading '/'s
and "--overwrite" to enforce the overwrite of existing files.
---
src/virtBootstrap/utils.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
index 63ef57a..5095ccf 100644
--- a/src/virtBootstrap/utils.py
+++ b/src/virtBootstrap/utils.py
@@ -106,7 +106,8 @@ def safe_untar(src, dest):
# Compression type is auto detected from tar
# Exclude files under /dev to avoid "Cannot mknod: Operation not permitted"
- params = ['--', '/bin/tar', 'xf', src, '-C', '/mnt', '--exclude', 'dev/*']
+ params = ['--', '/bin/tar', 'xf', src, '-C', '/mnt', '--exclude', 'dev/*',
+ '--overwrite', '--absolute-names']
execute(virt_sandbox + params)
--
2.13.5
More information about the virt-tools-list
mailing list