From 537172f3d79655e5b166ad3f4b13a9d9a9d570e5 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Wed, 14 Aug 2024 12:18:19 +0200 Subject: [PATCH] Fix issue with search timeout --- .github/workflows/ci-toolchain.yml | 15 ++++++--------- src/alire/alire-solver.adb | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-toolchain.yml b/.github/workflows/ci-toolchain.yml index 088547fdf..9157d7f53 100644 --- a/.github/workflows/ci-toolchain.yml +++ b/.github/workflows/ci-toolchain.yml @@ -61,23 +61,20 @@ jobs: run: ./bin/alr -d -n version | grep 'compiled with version' | grep -q '${{ matrix.gcc_version }}' - name: Update dependencies - run: ./bin/alr -d -n update + run: ./bin/alr -d -n -f update + # Force because otherwise solving may time out in non-interactive mode - name: Show dependencies/pins - run: | - ./bin/alr -d -n -q with --solve || ./bin/alr -n -v -d with --solve - if ./bin/alr -n -q with --solve | grep -q 'Dependencies (missing):'; then - echo "SELF-SOLVING FAILED, complete log follows:" - ./bin/alr -n -vv update - exit 1 - fi + run: ./bin/alr -d -n -q with --solve || ./bin/alr -n -v -d with --solve - name: Show build environment, with debug fallback run: ./bin/alr -d -n printenv || ./bin/alr -n -v -d printenv - name: Move ./bin to ./bin-old to allow for self-build shell: bash - run: mv ./bin ./bin-old || { sleep 5s && mv ./bin ./bin-old; } + run: | + mv ./bin ./bin-old || \ + { sleep 5s && mv ./bin ./bin-old && echo Old moved on 2nd attempt } # Windows doesn't allow to replace a running exe so the next command # fails otherwise. Also, this mv fails sometimes so we try twice JIC. diff --git a/src/alire/alire-solver.adb b/src/alire/alire-solver.adb index 073e77b73..566e64bc7 100644 --- a/src/alire/alire-solver.adb +++ b/src/alire/alire-solver.adb @@ -1754,7 +1754,7 @@ package body Alire.Solver is begin Timer.Hold; - if Not_Interactive + if (Not_Interactive and then not Force) or else Options.Stopping = Stop or else User_Answer_Continue = No then