Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833356 - dev-dotnet/dotnet-sdk-bin: provide mechanism to link in dotnet-sdk supporting structures so that current can build prior targets
Summary: dev-dotnet/dotnet-sdk-bin: provide mechanism to link in dotnet-sdk supporting...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 900597
  Show dependency tree
 
Reported: 2022-02-14 20:18 UTC by Davyd McColl
Modified: 2023-09-15 20:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davyd McColl 2022-02-14 20:18:50 UTC
Using the examples of the current version of dev-dotnet/dotnet-sdk-bin (6.0) and the prior, very popular version of 3.1, it's quite possible to use the former to build targets for the latter if the supporting structures are linked in.

If I disable the use flag `dotnet-symlink` to enable multi-slot install, I can install dotnet-sdk-bin 6.0 and 3.1 side-by-side (presumably, this would apply to 5.0 as well). 

[ Side-note: I'd like to be able to build with a single `dotnet` command (which I can manually link to /usr/bin/dotnet, though it would be really nice if the final solution to this did the symlink _and_ allowed side-by-side installation for the different stable versions) ]

So, with the use flag disabled, preventing the soft-block, I can install the two variants (6.0 and 3.1) and then with a few symlinks, I can use the 6.0 sdk to build 3.1 targets, specifically:

./sdk/3.1.416
./packs/Microsoft.AspNetCore.App.Ref/3.1.10
./packs/Microsoft.NETCore.App.Host.linux-x64/3.1.22
./packs/Microsoft.NETCore.App.Ref/3.1.0
./shared/Microsoft.NETCore.App/3.1.22
./templates/3.1.23
./host/fxr/3.1.22

(from `find . -type l` in the /opt/dotnet-sdk-bin-6.0 folder)

It may not be reasonable to upgrade a 3.1-targeting project so it's useful to have the side-by-side installation (eg attempting to upgrade a project I currently have which targets 3.1 encounters breaking changes in 6.0), but without the above symlinks, manual user intervention is required to select the "correct" dotnet executable to complete the build. With the above symlinks and a link at /usr/bin/dotnet (to the 6.0 dotnet, as per the `dotnet-symlink` use flag), I can build projects targeting older sdks without any fuss.


So the request here is for an enhancement to the ebuilds such that side-by-side installation is eased with the above symlinks so that builds which would work without any fiddling on Windows would work just as well under Gentoo. I'm not at all competent with creating ebuilds, but will gladly offer any help that I can here (:
Comment 1 Maciej Barć gentoo-dev 2023-09-15 20:54:59 UTC
Merged.