From 5ee269eef8bd02d066151deaa4d8c0fe6b6cbce4 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 15 Nov 2022 01:04:46 -0500 Subject: [PATCH] BundledVersions: update portable rid logic (backport dotnet#14647) --- .../tarball/content/repos/installer.proj | 5 +++++ src/redist/targets/GetRuntimeInformation.targets | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/tarball/content/repos/installer.proj index 6c08a1f67d8e..95d47c94152a 100644 --- a/src/SourceBuild/tarball/content/repos/installer.proj +++ b/src/SourceBuild/tarball/content/repos/installer.proj @@ -10,6 +10,10 @@ osx-x64 $(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-")))) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + --runtime-id $(OverrideTargetRid) --runtime-id $(TargetRid) @@ -22,6 +26,7 @@ --> $(BuildCommandArgs) /p:NETCoreAppMaximumVersion=99.9 $(BuildCommandArgs) /p:OSName=$(OSNameOverride) + $(BuildCommandArgs) /p:PortableOSName=$(PortableOS) $(BuildCommandArgs) /p:Rid=$(TargetRid) $(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir) diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets index a99a7e9daf5b..89f000119940 100644 --- a/src/redist/targets/GetRuntimeInformation.targets +++ b/src/redist/targets/GetRuntimeInformation.targets @@ -9,10 +9,15 @@ osx freebsd linux - + + $(Rid.Substring(0, $(Rid.LastIndexOf('-')))) $(HostOSName) - $(OSName)-$(Architecture) + $(OSName) + + $(OSName)-$(Architecture) + + $(PortableOSName)-$(Architecture) @@ -23,10 +28,9 @@ - $(Rid) - $(OSName)-$(Architecture) + $(Rid) + + $(PortableRid) $(HostOSName)-$(Architecture)