From: Karel Zak Date: Tue, 15 Aug 2023 09:02:43 +0000 (+0200) Subject: github: check apt-cache in more robust way X-Git-Tag: v2.40-rc1~284 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86d5c4dbf6e62c52fe9295f4e55eb629d8e26cfb;p=thirdparty%2Futil-linux.git github: check apt-cache in more robust way Reported-by: Masatake YAMATO Signed-off-by: Karel Zak --- diff --git a/.github/workflows/cibuild-setup-ubuntu.sh b/.github/workflows/cibuild-setup-ubuntu.sh index 423e38f998..4c0fdc6b44 100755 --- a/.github/workflows/cibuild-setup-ubuntu.sh +++ b/.github/workflows/cibuild-setup-ubuntu.sh @@ -41,7 +41,9 @@ PACKAGES_OPTIONAL=( if [[ "$QEMU_USER" != "1" ]]; then MODULES_PACKAGE="linux-modules-extra-$(uname -r)" # may not exist anymore - if apt-cache show "$MODULES_PACKAGE" >/dev/null 2>&1; then + APT_CACHE_OUTPUT=$(apt-cache show "$MODULES_PACKAGE") + APT_CACHE_STATUS=$? + if [[ "${APT_CACHE_STATUS}" == 0 && -n "${APT_CACHE_OUTPUT}" ]]; then PACKAGES+=("$MODULES_PACKAGE") fi fi