CI: Use DNF 4 in mock to workaround dnf5#1084

mock-core-configs-39.3 switched the package manager for Fedora 40 to dnf5
  https://fedoraproject.org/wiki/Changes/BuildWithDNF5

dnf5 builddep cannot handle BuildRequires with square brackets,
e.g. with Python extras, leading to errors like:

  No match for argument: python3dist(setuptools-scm[toml]) >= 5
  No match for argument: python3dist(raven[flask])
  No match for argument: python3dist(ini2toml[lite]) >= 0.9

This is reported: https://github.com/rpm-software-management/dnf5/issues/1084

Until it is fixed, we explicitly use the "dnf" (i.e. DNF 4) package manager in mock,
even on Fedora 40+.
This commit is contained in:
Miro Hrončok 2023-12-11 15:09:35 +01:00
parent 22918dd2a6
commit d62ed44b6e
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ if [ ! -f $config ]; then
cp $original $config
echo -e '\n\n' >> $config
echo -e 'config_opts["package_manager"] = "dnf"' >> $config
echo -e 'config_opts["package_manager_max_attempts"] = 10' >> $config
echo -e 'config_opts["package_manager_attempt_delay"] = 60' >> $config
echo -e '\n\nconfig_opts[f"{config_opts.package_manager}.conf"] += """' >> $config