protonscr

detect_release function in steam.sh doesn't work on many systems

steamopen
ValveSoftware/steam-for-linux#9857 · opened 2023-07-15 by JulianGro · updated 2023-07-15 · 0 comments · github
JJulianGro 2023-07-15 github

Your system information

Please describe your issue in as much detail as possible:

Steams steam.sh Linux distribution version checking code doesn't work on Debian Testing, and presumably on many other testing or rolling release type distribtions.

On Debian Testing, it will hit line 124 because os-release exists, but os-release in Debian Testing doesn't have a VERSION_ID, since it is a testing system.

function detect_release()
{
	if [ -f /etc/lsb-release ]; then
		(. /etc/lsb-release; echo $DISTRIB_RELEASE)
	elif [ -f /etc/os-release ]; then
		(. /etc/os-release; echo $VERSION_ID)
	elif [ -f /etc/debian_version ]; then
		cat /etc/debian_version
	else
		# Generic fallback
		uname -r
	fi
}

In case of Debian Testing, continuing down to debian_version would help, as it would currently return "trixie/sid".

Steps for reproducing this issue:

  1. Run Steam on Debian Testing

Output of the relevant commands on Debian Testing

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ cat /etc/debian_version
trixie/sid
$ cat /etc/lsb-release
cat: /etc/lsb-release: File not found
$ uname -r
6.3.0-1-amd64
$ 

Nothing extracted yet.