File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,15 @@ jobs:
165165 curl -sSL --retry ${NET_RETRY_COUNT:-5} 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xE1DD270288B4E6030699E45FA1715D88E1DF1F24' | sudo gpg --dearmor > /etc/apt/trusted.gpg.d/git-core_ubuntu_ppa.gpg
166166 for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done
167167 apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
168- apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git locales
168+ osver=$(lsb_release -sr | cut -f1 -d.)
169+ pkgs="g++ git xz-utils"
170+ # Ubuntu 22+ has only Python 3 in the repos
171+ if [ -n "$osver" ] && [ "$osver" -ge "20" ]; then
172+ pkgs+=" python-is-python3 libpython3-dev"
173+ else
174+ pkgs+=" python libpython-dev"
175+ fi
176+ apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install $pkgs
169177 fi
170178 # For jobs not compatible with ccache, use "ccache: no" in the matrix
171179 if [[ "${{ matrix.ccache }}" == "no" ]]; then
You can’t perform that action at this time.
0 commit comments