build: restore qemu download logic (#3768)

I recently changed it to download a fixed .deb but seems it's updated
more frequently than I anticipated because the dfsg-7ubuntu1_package is
already gone, replaced with dfsg-7ubuntu2.

Bring back the downloader logic that fetches the filename from the
directory listing.
This commit is contained in:
Ben Noordhuis 2022-09-26 11:29:50 +02:00 committed by GitHub
parent b00d1bd225
commit c798dd7ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,13 @@ jobs:
- uses: actions/checkout@v2
- name: Install QEMU
# this ensure install latest qemu on ubuntu, apt get version is old
env:
QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu"
QEMU_VER: "qemu-user-static_7\\.0+dfsg-.*_amd64.deb$"
run: |
wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_7.0+dfsg-7ubuntu1_amd64.deb
sudo dpkg -i qemu-user-static_7.0+dfsg-7ubuntu1_amd64.deb
DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
wget $QEMU_SRC/$DEB
sudo dpkg -i $DEB
- name: Install ${{ matrix.config.toolchain }}
run: |
sudo apt update