Skip to content

Commit c411a49

Browse files
authored
Remove distros versions calculation (#14752)
1 parent 020255b commit c411a49

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

eng/common/native/init-distro-rid.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ getNonPortableDistroRid()
2020
# shellcheck disable=SC1091
2121
if [ -e "${rootfsDir}/etc/os-release" ]; then
2222
. "${rootfsDir}/etc/os-release"
23-
if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ] || [ "${ID}" = "alpine" ] || [ "${ID}" = "ol" ]; then
24-
VERSION_ID="${VERSION_ID%.*}" # Remove the last version digit for these distros
25-
fi
26-
2723
if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then
2824
nonPortableRid="${ID}.${VERSION_ID}-${targetArch}"
2925
else
@@ -48,19 +44,7 @@ getNonPortableDistroRid()
4844
nonPortableRid="android.$__android_sdk_version-${targetArch}"
4945
elif [ "$targetOs" = "illumos" ]; then
5046
__uname_version=$(uname -v)
51-
case "$__uname_version" in
52-
omnios-*)
53-
__omnios_major_version=$(echo "$__uname_version" | cut -c9-10)
54-
nonPortableRid="omnios.$__omnios_major_version-${targetArch}"
55-
;;
56-
joyent_*)
57-
__smartos_major_version=$(echo "$__uname_version" | cut -c9-10)
58-
nonPortableRid="smartos.$__smartos_major_version-${targetArch}"
59-
;;
60-
*)
61-
nonPortableRid="illumos-${targetArch}"
62-
;;
63-
esac
47+
nonPortableRid="illumos-${targetArch}"
6448
elif [ "$targetOs" = "solaris" ]; then
6549
__uname_version=$(uname -v)
6650
__solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1)

0 commit comments

Comments
 (0)