"outdir": './mic-output',
"arch": None, # None means auto-detect
- "pkgmgr": "yum",
+ "pkgmgr": "auto",
"name": "output",
"ksfile": None,
"ks": None,
self.bootstrap['enable'] = parser.getboolean('main', 'enable')
except:
self.bootstrap['enable'] = False
- if self.bootstrap['distro_name']:
+ if not self.bootstrap['distro_name']:
self.bootstrap['distro_name'] = self.common['distro_name']
configmgr = ConfigMgr()
raise errors.BootstrapError(err)
# clean stuff:
- # yum backend, not available in bootstrap;
# bootstrap.conf, disable bootstrap mode inside bootstrap
- clrpaths = [os.path.join(libpth, 'plugins/backend/yumpkgmgr.py'),
- os.path.join(libpth, 'plugins/backend/yumpkgmgr.pyc'),
+ clrpaths = [
'/etc/mic/bootstrap.conf',
]
except:
pass
- # use default zypp backend
+ # auto select backend
conf_str = file(_path(conf)).read()
- conf_str = re.sub("pkgmgr\s*=\s*yum", "pkgmgr=zypp", conf_str)
+ conf_str = re.sub("pkgmgr\s*=\s*.*", "pkgmgr=auto", conf_str)
with open(_path(conf), 'w') as wf:
wf.write(conf_str)
# try to find the pkgmgr
pkgmgr = None
for (key, pcls) in pluginmgr.get_plugins('backend').iteritems():
- if key == creatoropts['pkgmgr']:
+ if 'auto' == creatoropts['pkgmgr']:
+ pkgmgr = pcls
+ break
+ elif key == creatoropts['pkgmgr']:
pkgmgr = pcls
break
# try to find the pkgmgr
pkgmgr = None
for (key, pcls) in pluginmgr.get_plugins('backend').iteritems():
- if key == creatoropts['pkgmgr']:
+ if 'auto' == creatoropts['pkgmgr']:
+ pkgmgr = pcls
+ break
+ elif key == creatoropts['pkgmgr']:
pkgmgr = pcls
break
# try to find the pkgmgr
pkgmgr = None
for (key, pcls) in pluginmgr.get_plugins('backend').iteritems():
- if key == creatoropts['pkgmgr']:
+ if 'auto' == creatoropts['pkgmgr']:
+ pkgmgr = pcls
+ break
+ elif key == creatoropts['pkgmgr']:
pkgmgr = pcls
break
# try to find the pkgmgr
pkgmgr = None
for (key, pcls) in pluginmgr.get_plugins('backend').iteritems():
- if key == creatoropts['pkgmgr']:
+ if 'auto' == creatoropts['pkgmgr']:
+ pkgmgr = pcls
+ break
+ elif key == creatoropts['pkgmgr']:
pkgmgr = pcls
break
# try to find the pkgmgr
pkgmgr = None
for (key, pcls) in pluginmgr.get_plugins('backend').iteritems():
- if key == creatoropts['pkgmgr']:
+ if 'auto' == creatoropts['pkgmgr']:
+ pkgmgr = pcls
+ break
+ elif key == creatoropts['pkgmgr']:
pkgmgr = pcls
break