new feature: runtime support and bootstrap runtime
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 29 Dec 2011 06:24:21 +0000 (14:24 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Sat, 31 Dec 2011 08:28:42 +0000 (16:28 +0800)
commit872b4001c9823ca636961cc662f7c58a698f5e24
tree1d87c9c2bba8804c55836b165cd90878415e15a0
parent9e96d749321ba460ffd16f6a51268658a01f5e05
new feature: runtime support and bootstrap runtime

1) Using --runtime=bootstrap option to run mic in bootstrap mode
   example: mic cr fs netbook.ks --runtime=bootstrap
2) Get target image rpm version(from ks file's repo url), which
   can be used to select correct bootstap.
3) Check local available bootstrap from default bootstrap directory
   (/var/mic/bootstrap/), if any local bootstrap can be used, then
   goto 5)
4) Check available bootstrap info from /etc/mic/mic.conf, rpm version
   of bootstrap is got from repodata, if rpmversion matched with target
   image rpm version, then select that bootstrap info.
5) Use zypp package manager to create bootstrap
6) We assume host mic is what user want to use, so copy host mic to
   bootstrap
7) copy host necessary files to bootstrap: /etc/resolv.conf, repos,
   proxy info.
8) run mic in bootstrap.

Note: Currently zypp backend is used to creating bootstrap env, but it's
not a good ideal, because zypp backend has some dependencies, such as
python-zypp, libzypp, libsatsolver. Next step, we would use general
depdendency resolve algorithm to replace zypp backend.
14 files changed:
distfiles/mic.conf
mic/bootstrap.py [new file with mode: 0644]
mic/chroot.py
mic/conf.py
mic/creator.py
mic/rt_util.py [new file with mode: 0644]
mic/utils/errors.py
mic/utils/misc.py
plugins/backend/zypppkgmgr.py
plugins/imager/fs_plugin.py
plugins/imager/livecd_plugin.py
plugins/imager/liveusb_plugin.py
plugins/imager/loop_plugin.py
plugins/imager/raw_plugin.py