summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-06-04 21:24:54 +0300
committerGitHub <noreply@github.com>2018-06-04 21:24:54 +0300
commit4eb5af3c62cba74ec1fd07201961af92217a4df0 (patch)
tree3133abfa397a7a46c14f9a4baa417de78b0cc395
parentd1cb861ff83a05f77ab95e50f94026d80e06bacb (diff)
parent6251054b5ba7ea6ae856b3e8a7ef351ea5c5e746 (diff)
downloadvmdb2-4eb5af3c62cba74ec1fd07201961af92217a4df0.tar.gz
Merge pull request #38 from bikeos/tar-options
rootfs_cache_plugin: expose tar options as 'options'
-rw-r--r--vmdb/plugins/rootfs_cache_plugin.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/vmdb/plugins/rootfs_cache_plugin.py b/vmdb/plugins/rootfs_cache_plugin.py
index 1ce8884..89a0eb8 100644
--- a/vmdb/plugins/rootfs_cache_plugin.py
+++ b/vmdb/plugins/rootfs_cache_plugin.py
@@ -45,13 +45,13 @@ class MakeCacheStepRunner(vmdb.StepRunnerInterface):
fs_tag = step['cache-rootfs']
rootdir = state.mounts[fs_tag]
tar_path = settings['rootfs-tarball']
+ opts = step.get('options', '--one-file-system').split()
if not tar_path:
raise Exception('--rootfs-tarball MUST be set')
if not os.path.exists(tar_path):
vmdb.progress(
'Caching contents of {} to {}'.format(rootdir, tar_path))
- vmdb.runcmd(['tar', '-C', rootdir, '--one-file-system',
- '-caf', tar_path, '.'])
+ vmdb.runcmd(['tar'] + opts + ['-C', rootdir, '-caf', tar_path, '.'])
class UnpackCacheStepRunner(vmdb.StepRunnerInterface):