Skip to content

Commit 9e0e3c5

Browse files
committed
runtime: add RIDs for anolis distro
instead of patching dotnet everytime after it got updated we plan to add runtime ID for anolis 7/anolis 8/anolis 9. Signed-off-by: Livy Ge <[email protected]>
1 parent 0bdf195 commit 9e0e3c5

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

eng/native/init-distro-rid.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ initNonPortableDistroRid()
4141
# We have forced __PortableBuild=0. This is because -portablebuld
4242
# has been passed as false.
4343
if (( isPortable == 0 )); then
44-
if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then
44+
if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" || "${ID}" == "anolis" ]]; then
4545
# remove the last version digit
4646
VERSION_ID="${VERSION_ID%.*}"
4747
fi

src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@
3030
<Versions>21;22;23;24;25;26;27;28;29;30;31;32</Versions>
3131
</RuntimeGroup>
3232

33+
<RuntimeGroup Include="anolis">
34+
<Parent>rhel</Parent>
35+
<Architectures>x64</Architectures>
36+
<Versions>7</Versions>
37+
<ApplyVersionsToParent>true</ApplyVersionsToParent>
38+
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
39+
</RuntimeGroup>
40+
<RuntimeGroup Include="anolis">
41+
<Parent>rhel</Parent>
42+
<Architectures>x64;arm64</Architectures>
43+
<Versions>8;9</Versions>
44+
<ApplyVersionsToParent>true</ApplyVersionsToParent>
45+
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
46+
</RuntimeGroup>
47+
3348
<RuntimeGroup Include="arch">
3449
<Parent>linux</Parent>
3550
<Architectures>x64</Architectures>

src/native/corehost/hostmisc/pal.unix.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ static
718718
pal::string_t normalize_linux_rid(pal::string_t rid)
719719
{
720720
pal::string_t rhelPrefix(_X("rhel."));
721+
pal::string_t anolisPrefix(_X("anolis."));
721722
pal::string_t alpinePrefix(_X("alpine."));
722723
pal::string_t rockyPrefix(_X("rocky."));
723724
size_t lastVersionSeparatorIndex = std::string::npos;
@@ -738,6 +739,10 @@ pal::string_t normalize_linux_rid(pal::string_t rid)
738739
{
739740
lastVersionSeparatorIndex = rid.find(_X("."), rockyPrefix.length());
740741
}
742+
else if (rid.compare(0, anolisPrefix.length(), anolisPrefix) == 0)
743+
{
744+
lastVersionSeparatorIndex = rid.find(_X("."), anolisPrefix.length());
745+
}
741746

742747
if (lastVersionSeparatorIndex != std::string::npos)
743748
{

0 commit comments

Comments
 (0)