Fix handling of missing release codename on DEB systems. (#14642)
Instead of treating it as a fatal error, just warn about it and skip native packages. Also fixes a long unnoticed bug in the early fallback case for native packages.
Austin S. Hemmelgarn committed
Mar 3, 2023 at 08:01 UTC
0a3a480a980894b051a7d282241922fdaed45c20
1 file changed
+8
-6
packaging/installer/kickstart.sh
+8
-6
@@ -692,11 +692,6 @@ get_system_info() {
692
centos|ol)
693
SYSVERSION=$(echo "$SYSVERSION" | cut -d'.' -f1)
694
;;
695
- ubuntu|debian)
696
- if [ -z "${SYSCODENAME}" ]; then
697
- fatal "Could not determine ${DISTRO} release code name. This is required information on these systems." F0511
698
- fi
699
- ;;
695
esac
696
;;
697
Darwin)
@@ -1360,9 +1355,16 @@ check_special_native_deps() {
1355
try_package_install() {
1356
failed_refresh_msg="Failed to refresh repository metadata. ${BADNET_MSG} or by misconfiguration of one or more rpackage repositories in the system package manager configuration."
1357
1363
- if [ -z "${DISTRO}" ] || [ "${DISTRO}" = "unknown" ]; then
1358
+ if [ -z "${DISTRO_COMPAT_NAME}" ] || [ "${DISTRO_COMPAT_NAME}" = "unknown" ]; then
1359
warning "Unable to determine Linux distribution for native packages."
1360
return 2
1361
+ elif [ -z "${SYSCODENAME}" ]; then
1362
+ case "${DISTRO_COMPAT_NAME}" in
1363
+ debian|ubuntu)
1364
+ warning "Release codename not set. Unable to check availability of native packages for this system."
1365
+ return 2
1366
+ ;;
1367
+ esac
1368
fi
1369
1370
set_tmpdir