mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-25 14:41:27 +00:00
Retry bodhi updates download
a few times if it fails
It's failing about one in six tries currently, with Bodhi 5.5 on the server end: https://github.com/fedora-infra/bodhi/issues/4105 this should work around that. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
41ddac0951
commit
0557a774ac
13
lib/utils.pm
13
lib/utils.pm
@ -446,7 +446,18 @@ sub setup_workaround_repo {
|
||||
# then we'll download each update for our release:
|
||||
my $advisories = $workarounds{$version};
|
||||
foreach my $advisory (@$advisories) {
|
||||
assert_script_run "bodhi updates download --updateid=$advisory", 180;
|
||||
my $count = 3;
|
||||
my $success = 0;
|
||||
while ($count) {
|
||||
if (script_run "bodhi updates download --updateid=$advisory", 180) {
|
||||
$count -= 1;
|
||||
}
|
||||
else {
|
||||
$count = 0;
|
||||
$success = 1;
|
||||
}
|
||||
}
|
||||
die "Workaround update download failed!" unless $success;
|
||||
}
|
||||
# and create repo metadata
|
||||
assert_script_run "createrepo .";
|
||||
|
Loading…
Reference in New Issue
Block a user