File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -1357,22 +1357,24 @@ if ! [[ ' ubuntu debian ' =~ " ${UPSTREAM_ID} " ]]; then
1357
1357
fi
1358
1358
fi
1359
1359
1360
- local codename
1361
- for codename in UBUNTU_CODENAME DEBIAN_CODENAME VERSION_CODENAME; do
1362
- UPSTREAM_CODENAME=$( sed -n -e " s/^$codename =//p" " ${OS_RELEASE} " )
1363
- [ -z " ${UPSTREAM_CODENAME} " ] || break
1364
- done
1365
-
1366
- # Debian 12+
1367
- if [ -z " ${UPSTREAM_CODENAME} " ] && [ -e /etc/debian_version ]; then
1368
- UPSTREAM_CODENAME=$( cut -d / -f 1 /etc/debian_version)
1360
+ # Debian Sid doesn't have it's own unique os-release file. It is the same as Debian stable.
1361
+ # So we first check /etc/debian_version to see if we're running sid. If not, we will trust what os-release says.
1362
+ if [[ " ${UPSTREAM_ID} " == " debian" ]] && grep -q " sid" /etc/debian_version; then
1363
+ UPSTREAM_CODENAME=" sid"
1364
+ OS_CODENAME=" sid"
1365
+ else
1366
+ local codename
1367
+ for codename in UBUNTU_CODENAME DEBIAN_CODENAME VERSION_CODENAME; do
1368
+ UPSTREAM_CODENAME=$( sed -n -e " s/^$codename =//p" " ${OS_RELEASE} " )
1369
+ [ -z " ${UPSTREAM_CODENAME} " ] || break
1370
+ done
1369
1371
fi
1370
1372
1371
1373
case " ${UPSTREAM_CODENAME} " in
1372
1374
buster) UPSTREAM_RELEASE=" 10" ;;
1373
1375
bullseye) UPSTREAM_RELEASE=" 11" ;;
1374
1376
bookworm) UPSTREAM_RELEASE=" 12" ;;
1375
- trixie) UPSTREAM_CODENAME =" 13" ;;
1377
+ trixie) UPSTREAM_RELEASE =" 13" ;;
1376
1378
sid) UPSTREAM_RELEASE=" unstable" ;;
1377
1379
focal) UPSTREAM_RELEASE=" 20.04" ;;
1378
1380
jammy) UPSTREAM_RELEASE=" 22.04" ;;
You can’t perform that action at this time.
0 commit comments