Skip to content

Commit 92dfbbd

Browse files
committed
Allow access to the buildroot repo
Workaround for keepcache=1 not working with dnf4/local repos.
1 parent a8f6059 commit 92dfbbd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mock/py/mockbuild/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,12 @@ def process_hermetic_build_config(cmdline_opts, config_opts):
811811

812812
config_opts["offline_local_repository"] = final_offline_repo
813813

814+
# Provide build access to buildroot packages solving same issue as
815+
# https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahosted.org/thread/ZIBY53JAURLT3QRBBJIJJ7EZWLZDE3TI/
816+
# keepcache=1 for local repos work only in dnf5 not dnf4
817+
config_opts['plugin_conf']['bind_mount_enable'] = True
818+
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append((final_offline_repo, '/hermetic_repo' ))
819+
814820
# We install all the packages at once (for now?). We could inherit the
815821
# command from the previous "online" run, but it often employs a group
816822
# installation command - and we have no groups in the offline repo.

0 commit comments

Comments
 (0)