From c798dd7ae58d18d982bda5471dc77b364c7ed565 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 26 Sep 2022 11:29:50 +0200 Subject: [PATCH] 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. --- .github/workflows/CI-unix.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-unix.yml b/.github/workflows/CI-unix.yml index feef54e3..7ef80a62 100644 --- a/.github/workflows/CI-unix.yml +++ b/.github/workflows/CI-unix.yml @@ -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