CI mock: Attempt to retry package manager action

This should be more robust when hitting:

 Errors during downloading metadata for repository 'local':
   - Status code: 404 for https://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/repodata/...-primary.xml.gz
   - Status code: 404 for https://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/repodata/...-filelists.xml.gz
This commit is contained in:
Miro Hrončok 2021-01-08 14:50:15 +01:00
parent 03fa61b26b
commit 76613bd4a7

View File

@ -11,6 +11,9 @@ if [ ! -f $config ]; then
original="/etc/mock/fedora-${fedora}-x86_64.cfg"
cp $original $config
echo -e '\n\n' >> $config
echo -e 'config_opts["package_manager_max_attempts"] = 5' >> $config
echo -e 'config_opts["package_manager_attempt_delay"] = 20' >> $config
echo -e '\n\nconfig_opts[f"{config_opts.package_manager}.conf"] += """' >> $config
# The zuul CI has zuul-build.repo