diff options
author | Gui Chen <gui.chen@intel.com> | 2014-02-12 23:06:18 -0500 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2014-03-04 02:02:20 -0500 |
commit | f3eb67d1b3ca561e9d823fa996199e14b0680bd6 (patch) | |
tree | 2b22f2d83f90753afebf8ec069f5ab411ccf7901 | |
parent | 922e95092ffa4b65c126bb0254778595e8be1e7b (diff) | |
download | mic-f3eb67d1b3ca561e9d823fa996199e14b0680bd6.tar.gz mic-f3eb67d1b3ca561e9d823fa996199e14b0680bd6.tar.bz2 mic-f3eb67d1b3ca561e9d823fa996199e14b0680bd6.zip |
add two new options '--repo' and '--ignore-ksrepo'
option '--repo' is to append a new repo to repo pool
option '--ignore-ksrepo' is to ignore repos in ks file
Change-Id: I10280f0c3f40b2f68186240f3694d2eb14104e10
Signed-off-by: Gui Chen <gui.chen@intel.com>
-rw-r--r-- | mic/conf.py | 2 | ||||
-rw-r--r-- | mic/creator.py | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/mic/conf.py b/mic/conf.py index 400829f..99b9696 100644 --- a/mic/conf.py +++ b/mic/conf.py @@ -64,6 +64,8 @@ class ConfigMgr(object): "repourl": {}, "localrepos": [], # save localrepos "runtime": "bootstrap", + "repo": {}, + "ignore_ksrepo": False, }, 'chroot': { "saveto": None, diff --git a/mic/creator.py b/mic/creator.py index e27c8a1..01e9844 100644 --- a/mic/creator.py +++ b/mic/creator.py @@ -123,6 +123,12 @@ class Creator(cmdln.Cmdln): optparser.add_option('', '--repourl', action='append', dest='repourl', default=[], help=SUPPRESS_HELP) + optparser.add_option('-R', '--repo', action='append', + dest='repo', default=[], + help=SUPPRESS_HELP) + optparser.add_option('', '--ignore-ksrepo', action='store_true', + dest='ignore_ksrepo', default=False, + help=SUPPRESS_HELP) return optparser def preoptparse(self, argv): @@ -274,6 +280,11 @@ class Creator(cmdln.Cmdln): continue configmgr.create['repourl'][key] = val + if self.options.repo: + configmgr.create['repo'] = self.options.repo + if self.options.ignore_ksrepo: + configmgr.create['ignore_ksrepo'] = self.options.ignore_ksrepo + def main(self, argv=None): if argv is None: argv = sys.argv |