dotnet / install-scripts

MIT License
128 stars 68 forks source link

Install should fail on unsupported architecture levels #444

Closed colejohnson66 closed 3 months ago

colejohnson66 commented 4 months ago

Quite a few times, users have used dotnet-install on devices that only support ARMv6. For example:

Unfortunately, .NET requires ARMv7 and will cryptically segfault (SIGSEGV) when ran on an ARMv6 core. There are ways to contort yourself and compile it yourself for ARMv6, but the user must be aware of this.

dotnet-install should verify the architectural support level in addition to the architecture. In other words, it should fail to complete if the user tries to install an ARMv7-required .NET onto an ARMv6 system. This wouldn't solve the problem of users moving their file system between devices (as #‍71642 above did), but it would help the vast majority of those who don't.

In addition, an override (-f/--force) command line flag should be added to bypass this lockout.

YuliiaKovalova commented 4 months ago

Hi @colejohnson66,

Thank you for reporting the issue. We prioritize it and let you know about the final decision.

baronfel commented 4 months ago

I think we should do this, and I think it might even be relatively simple to add.

We check the machine architecture here, and we could check for the versions of arm64 here, not just the presence/absence of arm.

YuliiaKovalova commented 4 months ago

@baronfel , sounds good, thank you! I will take it for the current iteration.

YuliiaKovalova commented 3 months ago

Hi @colejohnson66,

The issue has been addressed in scope of https://github.com/dotnet/install-scripts/pull/455. It will be available for downloading within next week.