dest='copy_kernel',
help='Copy kernel files from image /boot directory'
' to the image output directory.')
+ optparser.add_option('', '--install-pkgs', type='string', action='store',
+ dest='install_pkgs', default=None,
+ help='Specify what type of packages to be installed,'
+ ' valid: source, debuginfo, debugsource')
optparser.add_option('', '--repourl', action='append',
dest='repourl', default=[],
help=SUPPRESS_HELP)
if self.options.copy_kernel:
configmgr.create['copy_kernel'] = self.options.copy_kernel
+ if self.options.install_pkgs:
+ configmgr.create['install_pkgs'] = []
+ for pkgtype in self.options.install_pkgs.split(','):
+ if pkgtype not in ('source', 'debuginfo'):
+ raise errors.Usage('Invalid parameter specified: "%s", '
+ 'valid values: source, debuginfo, '
+ 'debusource' % pkgtype)
+
+ configmgr.create['install_pkgs'].append(pkgtype)
+
if self.options.repourl:
for item in self.options.repourl:
try:
pkg_manager = self.get_pkg_manager()
pkg_manager.setup()
+ if hasattr(self, 'install_pkgs') and self.install_pkgs:
+ if 'debuginfo' in self.install_pkgs:
+ pkg_manager.install_debuginfo = True
+
for repo in kickstart.get_repos(self.ks, repo_urls):
(name, baseurl, mirrorlist, inc, exc,
proxy, proxy_username, proxy_password, debuginfo,