Skip to content

Commit 898aab7

Browse files
committed
Fix Linux x86 installation to be more robust
1 parent 474edb5 commit 898aab7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/integration_tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ jobs:
320320
timeout_minutes: 15
321321
max_attempts: 3
322322
command: |
323+
set -ex
323324
python scripts/gha/install_prereqs_desktop.py --gha_build --arch '${{ matrix.arch }}' --ssl '${{ matrix.ssl_variant }}'
324325
pip install -r scripts/gha/requirements.txt
325326
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
@@ -875,8 +876,8 @@ jobs:
875876
with:
876877
timeout_minutes: 15
877878
max_attempts: 3
879+
set -ex
878880
command: python scripts/gha/install_prereqs_desktop.py --gha_build --running_only --arch '${{ matrix.arch }}' --ssl '${{ matrix.ssl_variant }}'
879-
880881
- name: Set up Node (12)
881882
uses: actions/setup-node@v2
882883
with:

scripts/gha/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ def install_x86_support_libraries(gha_build=False):
249249
# Install them.
250250
run_command(['dpkg', '--add-architecture', 'i386'], as_root=True, check=True)
251251
run_command(['apt', 'update'], as_root=True, check=True)
252-
run_command(['apt', 'install', '-V', '-y'] + packages, as_root=True, check=True)
252+
process = run_command(['apt', 'install', '-V', '-y', '-f'] + packages, as_root=True)
253+
if process.returncode != 0:
254+
# Some dependency couldn't be installed, allow apt to fix things.
255+
run_command(['apt', 'upgrade', '--with-new-pkgs'], as_root=True, check=True)
253256

254257
if gha_build:
255258
# One more workaround: downgrading libpcre2-8-0 above may have uninstalled
@@ -260,3 +263,5 @@ def install_x86_support_libraries(gha_build=False):
260263
# Note: "-f" = "fix" - let apt do what it needs to do to fix dependencies.
261264
run_command(['apt', 'install', '-f', '-V', '-y', 'libsecret-1-dev'],
262265
as_root=True, check=True)
266+
# Allow apt to fix anything else that's broken.
267+
run_command(['apt', 'upgrade', '--with-new-pkgs'], as_root=True, check=True)

0 commit comments

Comments
 (0)