From 7693d1fddc311f8449b92ced097066548bc3a445 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 ++++++--------- TODO | 3 --- src/alire/alire-solver.adb | 6 ++++-- src/alire/alire-solver.ads | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 TODO diff --git a/.github/workflows/ci-toolchain.yml b/.github/workflows/ci-toolchain.yml index 088547fdf..a91336002 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/TODO b/TODO deleted file mode 100644 index fe8c05491..000000000 --- a/TODO +++ /dev/null @@ -1,3 +0,0 @@ -Try to speed-up Contains_All_Satisfiable -Reduce debug logging? Make it settings-disableable? -Compiler ordering diff --git a/src/alire/alire-solver.adb b/src/alire/alire-solver.adb index 073e77b73..b0970d6a9 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 @@ -1792,7 +1792,9 @@ package body Alire.Solver is (Question => "Do you want to keep solving for a few more seconds?", Valid => (others => True), - Default => (if Not_Interactive then No else Yes)); + Default => (if Not_Interactive and then not Force + then No + else Yes)); end if; if User_Answer_Continue /= No then diff --git a/src/alire/alire-solver.ads b/src/alire/alire-solver.ads index 1da09680d..6b544cb7f 100644 --- a/src/alire/alire-solver.ads +++ b/src/alire/alire-solver.ads @@ -101,7 +101,7 @@ package Alire.Solver is type Query_Options is record Age : Age_Policies := Newest; - Stopping : Stopping_Policies := Continue; + Stopping : Stopping_Policies := Ask; Detecting : Detection_Policies := Detect; Hinting : Hinting_Policies := Hint;