chore: make akshara retry package downloads 30 times before failing
This commit is contained in:
parent
a3ad96fc65
commit
9f2f25b037
1 changed files with 18 additions and 12 deletions
30
akshara
30
akshara
|
@ -241,19 +241,25 @@ Server = {package_repo["repo-url"]}
|
||||||
exec_chroot('pacman-key', '--init')
|
exec_chroot('pacman-key', '--init')
|
||||||
exec_chroot('pacman-key', '--populate')
|
exec_chroot('pacman-key', '--populate')
|
||||||
|
|
||||||
if exec_chroot('pacman', '-Syu', '--noconfirm') != 0:
|
counter = 0
|
||||||
if exec_chroot('pacman', '-Syu', '--noconfirm') != 0:
|
while True:
|
||||||
if exec_chroot('pacman', '-Syu', '--noconfirm') != 0:
|
return_val = exec_chroot('pacman', '-Syu', '--noconfirm')
|
||||||
if exec_chroot('pacman', '-Syu', '--noconfirm') != 0:
|
counter += 1
|
||||||
error('update failed due to unsuccessful package downloads')
|
if counter > 30:
|
||||||
sys.exit(50)
|
error('failed to download packages')
|
||||||
|
exit(50)
|
||||||
|
if return_val == 0:
|
||||||
|
break
|
||||||
|
|
||||||
if exec_chroot('pacman', '-S', '--ask=4', *packages) != 0:
|
counter = 0
|
||||||
if exec_chroot('pacman', '-S', '--ask=4', *packages) != 0:
|
while True:
|
||||||
if exec_chroot('pacman', '-S', '--ask=4', *packages) != 0:
|
return_val = exec_chroot('pacman', '-S', '--ask=4', *packages)
|
||||||
if exec_chroot('pacman', '-S', '--ask=4', *packages) != 0:
|
counter += 1
|
||||||
error('update failed due to unsuccessful package downloads')
|
if counter > 30:
|
||||||
sys.exit(50)
|
error('failed to download packages')
|
||||||
|
exit(50)
|
||||||
|
if return_val == 0:
|
||||||
|
break
|
||||||
|
|
||||||
if type(blend_release.get('commands')) == list:
|
if type(blend_release.get('commands')) == list:
|
||||||
for command in blend_release.get('commands'):
|
for command in blend_release.get('commands'):
|
||||||
|
|
Loading…
Reference in a new issue