Skip to content

Commit e330850

Browse files
committed
add workaround for 404 error when installing packages in CI workflow for testing Apptainer integration
1 parent c14a130 commit e330850

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/container_tests_apptainer.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,18 @@ jobs:
2929
- name: install OS & Python packages
3030
run: |
3131
# for building CentOS 7 container images
32-
sudo apt-get install rpm
33-
sudo apt-get install dnf
32+
APT_PKGS="rpm dnf"
3433
# for modules tool
35-
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
34+
APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev"
35+
36+
# Avoid apt-get update, as we don't really need it,
37+
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
38+
if ! sudo apt-get install $APT_PKGS; then
39+
# Try to update cache, then try again to resolve 404s of old packages
40+
sudo apt-get update -yqq || true
41+
sudo apt-get install $APT_PKGS
42+
fi
43+
3644
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
3745
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
3846
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then

0 commit comments

Comments
 (0)