Skip to content

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

Open
BreezeDelegate wants to merge 1 commit into
GameServerManagers:developfrom
BreezeDelegate:fix/debian13-apt-sources
Open

fix(deps): support deb822 apt sources on Debian#4952
BreezeDelegate wants to merge 1 commit into
GameServerManagers:developfrom
BreezeDelegate:fix/debian13-apt-sources

Conversation

@BreezeDelegate

Copy link
Copy Markdown

Description

Check Debian APT sources in sources.list, sources.list.d/*.list, and DEB822 *.sources files when deciding whether the SteamCMD package is available. Missing legacy paths no longer print grep errors.

Fixes #4934

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Testing

  • Commands/tests run: bash -n lgsm/modules/check_deps.sh, ShellCheck, Debian 13 container checks with DEB822 sources both with and without non-free.
  • Result: passed; fallback remains active without non-free, and the SteamCMD package path is detected when non-free is present.
  • Environment used (distro/version): Debian 13 (trixie) container.

Risk and rollback

  • Risk level: low
  • Rollback plan: revert this change to restore the legacy single-file check.

Breaking changes

  • No breaking changes.
  • Breaking changes included (describe below).

Documentation impact

  • No documentation update required.
  • User documentation update required.
  • Developer documentation update required.

Checklist

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have provided a detailed enough description of this PR.

Copilot AI lite review requested due to automatic review settings August 22, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 steamcmd repo check to scan /etc/apt/sources.list.d/*.list and /etc/apt/sources.list.d/*.sources.
  • Suppress grep stderr 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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants