Skip to content

Commit

Permalink
Fix issue with search timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Sep 5, 2024
1 parent fa82e07 commit 924bdbe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 0 additions & 3 deletions TODO

This file was deleted.

6 changes: 4 additions & 2 deletions src/alire/alire-solver.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/alire/alire-solver.ads
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 924bdbe

Please sign in to comment.