dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.68k stars 1.06k forks source link

Userlocal workload installation/updates are broken in 8.0.300 #41420

Closed baronfel closed 2 months ago

baronfel commented 4 months ago
          @Mr-MooMoo, I reproduced the issue. It is different from the one @anpin ran into with the 8.0.2xx SDK.

@marcpopMSFT @dsplaisted @baronfel it seems that userlocal is broken in the 8.0.3xx band.

The issue can be reproduced with these commands (on any linux-x64 distro).

mkdir /tmp/repro
cd /tmp/repro
mkdir dotnet
cd dotnet
wget https://download.visualstudio.microsoft.com/download/pr/86497c4f-3dc8-4ee7-9f6a-9e0464059427/293d074c28bbfd9410f4db8e021fa290/dotnet-sdk-8.0.301-linux-x64.tar.gz
tar xvf *.tar.gz
mkdir -p metadata/workloads/8.0.300
touch metadata/workloads/8.0.300/userlocal
chmod -R -w .
export DOTNET_ROOT=$(pwd)
export PATH=$(pwd):$PATH
cd ..
mkdir home
cd home
export HOME=$(pwd)
dotnet workload update

Originally posted by @tmds in https://github.com/dotnet/sdk/issues/37706#issuecomment-2150080968

We should ensure that userlocal configurations work with workloads sets - all state and workload set packs should go to the userlocal location instead of the SDK location.

NOTE: When I did the repro steps I had to make sure to change to a user without root permissions so that I couldn't accidentally modify the SDK install

baronfel commented 4 months ago

@tmds I'm assuming that this is broken in 9.0.100 previews as well, right? Since the work from 8.0.300 has flowed into main at this point?

tmds commented 3 months ago

@tmds I'm assuming that this is broken in 9.0.100 previews as well, right?

Yes, reported for .NET 9 in https://github.com/dotnet/sdk/issues/41726.