PR#4287: Add new option for mock option - bootstrap_image_ready
Merges #4287 https://pagure.io/koji/pull-request/4287 Fixes: #3958 https://pagure.io/koji/issue/3958 RFE: New option for the Mock's option bootstrap_image_ready
This commit is contained in:
commit
8ad473b6f2
4 changed files with 12 additions and 0 deletions
|
|
@ -469,6 +469,8 @@ class BuildRoot(object):
|
||||||
cmd.append('--new-chroot')
|
cmd.append('--new-chroot')
|
||||||
else:
|
else:
|
||||||
cmd.append('--old-chroot')
|
cmd.append('--old-chroot')
|
||||||
|
if self.config['extra'].get('mock.bootstrap_image_ready', False):
|
||||||
|
cmd.append('--bootstrap-image-ready')
|
||||||
cmd.extend(args)
|
cmd.extend(args)
|
||||||
self.logger.info(format_shell_cmd(cmd))
|
self.logger.info(format_shell_cmd(cmd))
|
||||||
workdir = getattr(self, 'workdir', None)
|
workdir = getattr(self, 'workdir', None)
|
||||||
|
|
|
||||||
|
|
@ -1188,6 +1188,9 @@ def anon_handle_mock_config(goptions, session, args):
|
||||||
opts['bootstrap_image'] = buildcfg['extra']['mock.bootstrap_image']
|
opts['bootstrap_image'] = buildcfg['extra']['mock.bootstrap_image']
|
||||||
else:
|
else:
|
||||||
opts['use_bootstrap_image'] = False
|
opts['use_bootstrap_image'] = False
|
||||||
|
if 'mock.bootstrap_image_ready' in buildcfg['extra']:
|
||||||
|
opts['bootstrap_image_ready'] = bool(buildcfg['extra']['mock.bootstrap_image_ready'])
|
||||||
|
# no else part as it would be driven by site-defaults.cfg
|
||||||
if 'mock.use_bootstrap' in buildcfg['extra']:
|
if 'mock.use_bootstrap' in buildcfg['extra']:
|
||||||
opts['use_bootstrap'] = buildcfg['extra']['mock.use_bootstrap']
|
opts['use_bootstrap'] = buildcfg['extra']['mock.use_bootstrap']
|
||||||
if 'mock.module_setup_commands' in buildcfg['extra']:
|
if 'mock.module_setup_commands' in buildcfg['extra']:
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,11 @@ environment follows:
|
||||||
|
|
||||||
- this option will automatically turn ``mock.use_bootstrap`` (this is how
|
- this option will automatically turn ``mock.use_bootstrap`` (this is how
|
||||||
it is implemented in mock)
|
it is implemented in mock)
|
||||||
|
|
||||||
|
* ``mock.bootstrap_image_ready`` - For the specification that we are ready for bootstrapping.
|
||||||
|
If we want to specify, that we are ready for bootstrapping, we need to know that these
|
||||||
|
two packages `python3-dnf` and `python3-dnf-plugins-coreare installed in the container.
|
||||||
|
|
||||||
* ``mock.module_setup_commands`` - commands for configuring the modules active
|
* ``mock.module_setup_commands`` - commands for configuring the modules active
|
||||||
in a buildroot. Available in `mock 2.4
|
in a buildroot. Available in `mock 2.4
|
||||||
<https://github.com/rpm-software-management/mock/wiki/Release-Notes-2.4>`__.
|
<https://github.com/rpm-software-management/mock/wiki/Release-Notes-2.4>`__.
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ config_opts['macros']['%distribution'] = 'Koji Testing'
|
||||||
'mock.yum.best': 10,
|
'mock.yum.best': 10,
|
||||||
'mock.bootstrap_image': 'bootstrap_image_content',
|
'mock.bootstrap_image': 'bootstrap_image_content',
|
||||||
'mock.use_bootstrap': True,
|
'mock.use_bootstrap': True,
|
||||||
|
'mock.bootstrap_image_ready': True,
|
||||||
'mock.module_setup_commands': 'module_setup_commands_content',
|
'mock.module_setup_commands': 'module_setup_commands_content',
|
||||||
'mock.releasever': 'releasever_content',
|
'mock.releasever': 'releasever_content',
|
||||||
},
|
},
|
||||||
|
|
@ -297,6 +298,7 @@ config_opts['macros']['%distribution'] = 'Koji Testing'
|
||||||
'releasever': 'releasever_content',
|
'releasever': 'releasever_content',
|
||||||
'use_bootstrap': True,
|
'use_bootstrap': True,
|
||||||
'use_bootstrap_image': True,
|
'use_bootstrap_image': True,
|
||||||
|
'bootstrap_image_ready': True,
|
||||||
'yum_best': 10,
|
'yum_best': 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue