]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
github: check apt-cache in more robust way
authorKarel Zak <kzak@redhat.com>
Wed, 16 Aug 2023 07:03:59 +0000 (09:03 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Aug 2023 07:10:27 +0000 (09:10 +0200)
References: 3119a8060102ed7dd04d4a782932494c386f72a6
Signed-off-by: Karel Zak <kzak@redhat.com>
.github/workflows/cibuild-setup-ubuntu.sh

index c7cc96c3cb6bc47a83ebc93798ed74083657b37a..f65393f4a22e08c7e1319a1b02d8f426aad5713c 100755 (executable)
@@ -40,7 +40,7 @@ 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
+       if APT_CACHE_OUTPUT=$(apt-cache show "$MODULES_PACKAGE") && [[ -n "$APT_CACHE_OUTPUT" ]]; then
                PACKAGES+=("$MODULES_PACKAGE")
        fi
 fi