Skip to content

Commit

Permalink
Ensure --addrepo option also affects bootstrap
Browse files Browse the repository at this point in the history
Fixes: #1414
  • Loading branch information
praiskup committed Sep 19, 2024
1 parent 78f2fc5 commit 8d77e1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mock/py/mockbuild/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions releng/release-notes-next/addrepo-affects-bootstrap.feature
Original file line number Diff line number Diff line change
@@ -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 <chroot> --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.

0 comments on commit 8d77e1b

Please sign in to comment.