Przeglądaj źródła

fix(deps): support deb822 apt sources on Debian (#4952)

* fix(deps): support deb822 apt sources on Debian

* fix(deps): ignore commented-out non-free entries in apt sources

The non-free check matched commented lines, so a disabled non-free
entry (more likely now that sources.list.d is searched) made LinuxGSM
try the unavailable steamcmd package instead of the tar fallback.
Only count lines whose first non-space character is not #.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: BreezeDelegate <271538431+BreezeDelegate@users.noreply.github.com>
Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Breeze 1 tydzień temu
rodzic
commit
f0db333093
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      lgsm/modules/check_deps.sh

+ 2 - 1
lgsm/modules/check_deps.sh

@@ -272,7 +272,8 @@ fn_deps_detector() {
 		array_deps_required=("${array_deps_required[@]/steamcmd/}")
 		steamcmdstatus=1
 		return
-	elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then
+	# Checks classic and deb822 sources for an uncommented non-free component (non-free-firmware does not count).
+	elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '^[[:space:]]*[^#[:space:]].*[[:space:]]non-free([[:space:]]|$)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources 2> /dev/null; then
 		array_deps_required=("${array_deps_required[@]/steamcmd/}")
 		steamcmdstatus=1
 		return