File tree Expand file tree Collapse file tree
build/azure-pipelines/linux Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ while [ $i -le 30 ];do
2929 elif grep -q ' dpkg frontend is locked by another process' $err ; then
3030 # dpkg process is busy by another process
3131 retry=true
32+ elif grep -q ' Failed to fetch' $err ; then
33+ # transient network issue when downloading packages
34+ retry=true
35+ elif grep -q ' Unable to fetch some archives' $err ; then
36+ # transient network issue when downloading packages
37+ retry=true
3238 fi
3339
3440 rm $err
Original file line number Diff line number Diff line change 44# Get snapcraft version
55snapcraft --version
66
7+ # Configure apt to retry on transient network failures
8+ # This applies to both the apt commands below and snapcraft's internal apt operations for stage-packages
9+ sudo sh -c ' echo "Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries'
10+
711# Make sure we get latest packages
812sudo apt-get update
913sudo apt-get upgrade -y
You can’t perform that action at this time.
0 commit comments