Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: give warning if distro is not supported by vendor #3723

Merged
merged 3 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lgsm/functions/check_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ if [ "${commandname}" == "INSTALL" ]; then
fi
fi

# Will warn user if their distro is no longer supported by the vendor.
if [ -n "${distrosupport}" ]; then
if [ "${distrosupport}" == "unsupported" ]; then
fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended."
fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended."
fi
fi

info_distro.sh

if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
Expand Down
17 changes: 17 additions & 0 deletions lgsm/functions/info_distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ else
distroversioncsv="${distroversion}"
fi

# Check if distro supported by distro vendor.
if [ "$(command -v distro-info 2>/dev/null)" ]; then
distrosunsupported="$(distro-info --unsupported)"
distrosunsupported_array=( "${distrosunsupported}" )
for distrounsupported in "${distrosunsupported_array[@]}"; do
if [ "${distrounsupported}" == "${distrocodename}" ]; then
distrosupport=unsupported
break
else
distrosupport=supported
fi
done
else
distrosupport=unknown
fi

echo "${distrosupport}"
## Glibc version
# e.g: 1.17
glibcversion="$(ldd --version | sed -n '1s/.* //p')"
Expand Down