Skip to content

Commit

Permalink
GH Actions: fix apt-get dependency hell
Browse files Browse the repository at this point in the history
The command as-it-was, is currently resulting in the following error:
```
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libpcre3-dev : Depends: libpcre3 (= 2:8.44-2+ubuntu20.04.1+deb.sury.org+1) but 2:8.39-12build1 is to be installed
 libpcrecpp0v5 : Depends: libpcre3 (>= 2:8.41) but 2:8.39-12build1 is to be installed
 php7.2-cgi : Depends: libpcre3 (>= 2:8.41) but 2:8.39-12build1 is to be installed
 php7.2-cli : Depends: libpcre3 (>= 2:8.41) but 2:8.39-12build1 is to be installed
 php7.2-fpm : Depends: libpcre3 (>= 2:8.41) but 2:8.39-12build1 is to be installed
 php7.2-phpdbg : Depends: libpcre3 (>= 2:8.41) but 2:8.39-12build1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
```

So, following the advise in the error message, I'm adding `apt --fix-broken install` to the workflows.
I'm also splitting the two commands in the "Install locales" step into separate steps to allow for easier debugging of where things actually go wrong.
  • Loading branch information
jrfnl committed Jan 21, 2022
1 parent 73dbbbe commit 4868341
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ jobs:
php-version: ${{ matrix.php }}
coverage: none

- name: Ensure apt tools are in a usable state
run: sudo apt --fix-broken install

- name: Update apt tools
run: sudo apt-get update

# At least one test needs a non-en_US locale to be available, so make sure it is.
- name: Install locales
run: |
sudo apt-get update
sudo apt-get install locales-all
run: sudo apt-get install locales-all

- name: Show available locales
run: locale -a
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ jobs:
coverage: ${{ steps.set_cov.outputs.COV }}
tools: cs2pr

- name: Ensure apt tools are in a usable state
run: sudo apt --fix-broken install

- name: Update apt tools
run: sudo apt-get update

# At least one test needs a non-en_US locale to be available, so make sure it is.
- name: Install locales
run: |
sudo apt-get update
sudo apt-get install locales-all
run: sudo apt-get install locales-all

- name: Show available locales
run: locale -a
Expand Down

0 comments on commit 4868341

Please sign in to comment.