[ci] Add --force-overwrite hack to work around packaging bug

Installation of libclang-16-dev would fail with:

    Unpacking libclang-16-dev (1:16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624) ...
    dpkg: error processing archive /var/cache/apt/archives/libclang-16-dev_1%3a16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624_amd64.deb (--unpack):
      trying to overwrite '/usr/lib/x86_64-linux-gnu/libclang-16.so.1', which is also in package libclang1-16 1:16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624
    ...
    Unpacking libclang-dev (1:16.0-57~exp1~20221014130100.5) ...
    Errors were encountered while processing:
      /var/cache/apt/archives/libclang-16-dev_1%3a16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624_amd64.deb
    ...
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Error: Process completed with exit code 100.

libclang-16-dev somehow depends on libclang1-16, and both are trying to
install the same libclang1.so.

Use --force-override switch to comfort dpkg, even though it's not
recommended in practice. See e.g. https://askubuntu.com/a/491086/852068.

Let's remove this as soon as possible.
This commit is contained in:
Kim Gräsman 2022-12-16 21:29:48 +01:00
parent c8ad78d584
commit 6c3b7bcfb8
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ jobs:
sudo apt remove -y "llvm*"
# Reinstall tagged versions
sudo apt install -y llvm$LLVM_TAG-dev
sudo apt install -y libclang$LLVM_TAG-dev
sudo apt install -y clang$LLVM_TAG
sudo apt -o DPkg::Options::="--force-overwrite" install -y libclang$LLVM_TAG-dev
sudo apt -o DPkg::Options::="--force-overwrite" install -y clang$LLVM_TAG
- name: Check out default branch
uses: actions/checkout@v2