copr-builders: patch Mock for DNF5 --allowerasing compat

This commit is contained in:
Pavel Raiskup 2024-03-09 16:27:15 +01:00
parent 09a841ed85
commit 82cb129606
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,19 @@
diff --git a/mock/py/mockbuild/config.py b/mock/py/mockbuild/config.py
index 67027ca6..2178c5b7 100644
--- a/mock/py/mockbuild/config.py
+++ b/mock/py/mockbuild/config.py
@@ -328,7 +328,13 @@ def setup_default_config_opts():
config_opts['dnf5_disable_plugins'] = []
# No --allowerasing with remove, per
# https://github.com/rpm-software-management/dnf5/issues/729
- config_opts["dnf5_avoid_opts"] = {"remove": ["--allowerasing"]}
+ config_opts["dnf5_avoid_opts"] = {
+ "remove": ["--allowerasing"],
+ "repoquery": ["--allowerasing"],
+ "makecache": ["--allowerasing"],
+ "search": ["--allowerasing"],
+ "info": ["--allowerasing"],
+ }
config_opts['microdnf_command'] = '/usr/bin/microdnf'
# "dnf-install" is special keyword which tells mock to use install but with DNF

View file

@ -229,6 +229,14 @@
# shell: /usr/bin/copr-update-builder
# when: mock_updated.changed
- name: patch from https://github.com/rpm-software-management/mock/pull/1341
patch:
src: patches/mock-allowerasing.patch
dest: /usr/lib/python3.12/site-packages/mockbuild/config.py
when:
- starting_builder
ignore_errors: true
- name: put copr-rpmbuild configuration file in the right place
copy: src=files/main.ini dest=/etc/copr-rpmbuild/main.ini
when: