diff options
author | JF Ding <jian-feng.ding@intel.com> | 2011-10-11 15:30:06 +0800 |
---|---|---|
committer | JF Ding <jian-feng.ding@intel.com> | 2011-10-11 15:30:06 +0800 |
commit | 09bff28bebf7b65da6c79a10c264c4c9ad3eda6d (patch) | |
tree | b801d878d73a91b88e96b44506d061d304b5fb67 /plugins/imager | |
parent | 650b5a2e660cdba2f19f44fce2a225dfc3149d9c (diff) | |
download | mic-09bff28bebf7b65da6c79a10c264c4c9ad3eda6d.tar.gz mic-09bff28bebf7b65da6c79a10c264c4c9ad3eda6d.tar.bz2 mic-09bff28bebf7b65da6c79a10c264c4c9ad3eda6d.zip |
support taring all loop imgs to a single file
--taring-to option to specify it
Diffstat (limited to 'plugins/imager')
-rw-r--r-- | plugins/imager/loop_plugin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/imager/loop_plugin.py b/plugins/imager/loop_plugin.py index 50c9c5f..c614b35 100644 --- a/plugins/imager/loop_plugin.py +++ b/plugins/imager/loop_plugin.py @@ -20,7 +20,7 @@ import shutil import tempfile from mic import configmgr, pluginmgr, chroot, msger -from mic.utils import misc, fs_related, errors +from mic.utils import misc, fs_related, errors, cmdln import mic.imager.loop as loop from mic.pluginbase import ImagerPlugin @@ -28,6 +28,7 @@ class LoopPlugin(ImagerPlugin): name = 'loop' @classmethod + @cmdln.option("--taring-to", dest="taring_to", type='string', default=None, help="Specify the filename for packaging all loop images into a single tarball") def do_create(self, subcmd, opts, *args): """${cmd_name}: create loop image @@ -64,7 +65,7 @@ class LoopPlugin(ImagerPlugin): pkgmgrs = pluginmgr.PluginMgr().get_plugins('backend').keys() raise errors.CreatorError("Can't find package manager: %s (availables: %s)" % (creatoropts['pkgmgr'], ', '.join(pkgmgrs))) - creator = loop.LoopImageCreator(creatoropts, pkgmgr) + creator = loop.LoopImageCreator(creatoropts, pkgmgr, opts.taring_to) if recording_pkgs is not None: creator._recording_pkgs = recording_pkgs |