fix(deps): support deb822 apt sources on Debian - #4952
Conversation
There was a problem hiding this comment.
Pull request overview
Updates LinuxGSM’s dependency detection logic so Debian’s APT repository configuration is checked across both legacy sources.list and modern /etc/apt/sources.list.d/ entries (including DEB822 *.sources) when deciding whether steamcmd should be treated as available via APT, while avoiding noisy grep errors for missing legacy paths.
Changes:
- Expand the Debian
steamcmdrepo check to scan/etc/apt/sources.list.d/*.listand/etc/apt/sources.list.d/*.sources. - Suppress
grepstderr to avoid user-facing “No such file or directory” output.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| steamcmdstatus=1 | ||
| return | ||
| elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then | ||
| elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources 2> /dev/null; then |
There was a problem hiding this comment.
Tested this on GNU grep: if any supplied file matches, grep returns 0 even when another path is missing (in either order), so the leading ! does not flip a valid match here. The stderr redirect only suppresses the missing-path noise.
Description
Check Debian APT sources in
sources.list,sources.list.d/*.list, and DEB822*.sourcesfiles when deciding whether the SteamCMD package is available. Missing legacy paths no longer print grep errors.Fixes #4934
Type of change
Testing
bash -n lgsm/modules/check_deps.sh, ShellCheck, Debian 13 container checks with DEB822 sources both with and withoutnon-free.non-free, and the SteamCMD package path is detected whennon-freeis present.Risk and rollback
Breaking changes
Documentation impact
Checklist