Simplify SB bootstrap package logic#46575
Conversation
b4585ba to
2aaf38d
Compare
|
@mthalman - I refactored a fair amount vs the initial draft. I think utilizing the PortableRid property with the existing pattern is best to ensure correctness as packages are added/removed. |
|
Any idea how to make option 3 "Surface a rid option in the prep script for advanced scenarios (e.g. target a different rid)" work? I have been trying to do what I did before this change: fetch the artifacts for But only |
|
@omajid, Can you open a new issue for your scenario? It looks like the prep script should be exposing the PortableRid option instead of the TargetRid as that is what is really using to bootstrap the artifacts. To workaround, set |
|
Thanks, I opened #47956 |
Before dotnet#46575 (commit cfe99e0), a ./prep-source-build.sh in the VMR would produce a Private.SourceBuilt.Artifacts.Bootstrap.tar.gz that would contain assets for all architectuers and portable RIDs. However, after that change, it becomes difficult to generate bootstrap artifacts for arm64 on x64. The expected approach doesn't work: $ ./prep-source-build.sh --rid linux-arm64 This has no effect, because it only sets TargetRid; the logic that computes what packages to download only uses PortableRid. After this commit, running the above command produces a bootstrap archive that contains arm64 artifacts too: $ tar tf ./prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz | grep linux Microsoft.AspNetCore.App.Runtime.linux-arm64.10.0.0-preview.2.25164.1.nupkg Microsoft.NETCore.App.Crossgen2.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.symbols.nupkg Microsoft.NETCore.App.Host.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Runtime.linux-arm64.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILDAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.TestHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.runtime.native.System.IO.Ports.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.symbols.nupkg
Before dotnet#46575 (commit cfe99e0), a ./prep-source-build.sh in the VMR would produce a Private.SourceBuilt.Artifacts.Bootstrap.tar.gz that would contain assets for all architectuers and portable RIDs. However, after that change, it becomes difficult to generate bootstrap artifacts for arm64 on x64. The expected approach doesn't work: $ ./prep-source-build.sh --rid linux-arm64 This has no effect, because it only sets TargetRid; the logic that computes what packages to download only uses PortableRid. After this commit, the following command produces a bootstrap archive on x64 that contains arm64 artifacts too: $ ./prep-source-build.sh --bootstrap-rid linux-arm64 $ tar tf ./prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz | grep linux Microsoft.AspNetCore.App.Runtime.linux-arm64.10.0.0-preview.2.25164.1.nupkg Microsoft.NETCore.App.Crossgen2.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.symbols.nupkg Microsoft.NETCore.App.Host.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Runtime.linux-arm64.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILDAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.TestHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.runtime.native.System.IO.Ports.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.symbols.nupkg
Before dotnet#46575 (commit cfe99e0), a ./prep-source-build.sh in the VMR would produce a Private.SourceBuilt.Artifacts.Bootstrap.tar.gz that would contain assets for all architectuers and portable RIDs. However, after that change, it becomes difficult to generate bootstrap artifacts for arm64 on x64. The expected approach doesn't work: $ ./prep-source-build.sh --rid linux-arm64 This has no effect, because it only sets TargetRid; the logic that computes what packages to download only uses PortableRid. After this commit, the following command produces a bootstrap archive on x64 that contains arm64 artifacts too: $ ./prep-source-build.sh --bootstrap-rid linux-arm64 $ tar tf ./prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz | grep linux Microsoft.AspNetCore.App.Runtime.linux-arm64.10.0.0-preview.2.25164.1.nupkg Microsoft.NETCore.App.Crossgen2.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Crossgen2.linux-x64.10.0.0-preview.2.25163.2.symbols.nupkg Microsoft.NETCore.App.Host.linux-arm64.10.0.0-preview.2.25163.2.nupkg Microsoft.NETCore.App.Runtime.linux-arm64.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.ILDAsm.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.Microsoft.NETCore.TestHost.10.0.0-preview.2.25163.2.nupkg runtime.linux-arm64.runtime.native.System.IO.Ports.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.nupkg runtime.linux-x64.Microsoft.DotNet.ILCompiler.10.0.0-preview.2.25163.2.symbols.nupkg
Fixes dotnet/source-build#3631
With the UB work, I propose refactoring the buildBootstrapPreviouslySB.csproj to make use of the PortableRid property to: