From db6bc7dfe660fd4e441437bdbfe764a15a65a973 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Sat, 9 Dec 2023 20:30:49 +0100 Subject: [PATCH] Fix open driver availability check fallback The previous code was always returning success, confusing users Fixes https://github.com/Frogging-Family/nvidia-all/issues/204 --- PKGBUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 98ec699..6810140 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -169,7 +169,8 @@ if [ -e options ]; then source options if [ "$_open_source_modules" != "false" ]; then # Open source kernel module availability check - if [[ "$( curl -Is "https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-$_driver_version.tar.xz" | head -n 1 )" = *200* ]] || [[ "$( curl -Is "https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$_driver_version.tar.gz" | head -n 1 )" = *302* ]]; then + msg2 "Checking open driver availability..." + if [[ "$( curl -Is "https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-$_driver_version.tar.xz" | head -n 1 )" = *200* ]] || [[ "$( curl -Is "https://codeload.github.com/NVIDIA/open-gpu-kernel-modules/tar.gz/refs/tags/$_driver_version" | head -n 1 )" = *200* ]]; then if [ -z "$_open_source_modules" ]; then msg2 " - Open source kernel modules available - " warning "IT ONLY OFFERS SUPPORT FOR TURING AND NEWER, AND DOESN'T OFFER ALL THE FEATURES OF THE PROPRIETARY ONE." @@ -184,7 +185,7 @@ if [ -e options ]; then fi if [[ "$( curl -Is "https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-$_driver_version.tar.xz" | head -n 1 )" = *200* ]]; then echo '_srcbase="NVIDIA-kernel-module-source"' >> options - elif [[ "$( curl -Is "https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$_driver_version.tar.gz" | head -n 1 )" = *302* ]]; then + elif [[ "$( curl -Is "https://codeload.github.com/NVIDIA/open-gpu-kernel-modules/tar.gz/refs/tags/$_driver_version" | head -n 1 )" = *200* ]]; then echo '_srcbase="open-gpu-kernel-modules"' >> options fi else