diff --git a/mock/py/mockbuild/util.py b/mock/py/mockbuild/util.py index a8cdd0f39..30dd108c4 100644 --- a/mock/py/mockbuild/util.py +++ b/mock/py/mockbuild/util.py @@ -991,11 +991,16 @@ def add_local_repo(config_opts, baseurl, repoid=None, bootstrap=None): best=1 """.format(repoid=repoid, baseurl=baseurl) - config_opts['{0}.conf'.format(config_opts['package_manager'])] += localyumrepo + def _fix_cfg(cfg): + cfg['dnf.conf'] += localyumrepo + + _fix_cfg(config_opts) if bootstrap is None: return + _fix_cfg(bootstrap.config) + if not baseurl.startswith("file:///") and not baseurl.startswith("/"): return diff --git a/releng/release-notes-next/addrepo-affects-bootstrap.feature b/releng/release-notes-next/addrepo-affects-bootstrap.feature new file mode 100644 index 000000000..a82e71f3a --- /dev/null +++ b/releng/release-notes-next/addrepo-affects-bootstrap.feature @@ -0,0 +1,8 @@ +The `--addrepo` option has been updated to affect both the bootstrap chroot +installation and the buildroot installation, as requested in [issue#1414][]. +However, be cautious, as Mock [aggressively caches the bootstrap][issue#1289]. +Always remember to run `mock -r --scrub=bootstrap` first. +Additionally, as more chroots are being switched to `bootstrap_image_ready = +True`, you'll likely need to use `--addrepo` **in combination with** +`--no-bootstrap-image`; otherwise, the bootstrap chroot installation will remain +unaffected.