Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914431 - app-eselect/eselect-dotnet-0.1.0: does not set DOTNET_ROOT
Summary: app-eselect/eselect-dotnet-0.1.0: does not set DOTNET_ROOT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-19 14:31 UTC by lupus
Modified: 2023-10-12 08:58 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 lupus 2023-09-19 14:31:37 UTC
`eselect dotnet set X` does not set env variable `DOTNET_ROOT`.
When DOTNET_ROOT is not set, `dotnet tools` complains about missing a runtime

Reproducible: Always

Steps to Reproduce:
1. eselect dotnet set X
2. dotnet tool update -g microsoft.sqlpackage
3. sqlpackage
Actual Results:  
You must install .NET to run this application.

App: /home/user/.dotnet/tools/sqlpackage
Architecture: x64
App host version: 7.0.11
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=gentoo.2.14-x64&apphost_version=7.0.11

Expected Results:  
SqlPackage: Command-line tool for creating and deploying SQL Server databases and DACPAC packages. (162.0.52.1)
Copyright (c) 2023 Microsoft Corporation.  All rights reserved
...

I discussed this on #gentoo IRC with xgqt.
The day after the introduction of app-eselect/eselect-dotnet, I had no idea on how to use the dotnet tools anymore, but we came up with a few tricks.

`dotnet-bin-6.0 exec ~/.dotnet/tools/.store/microsoft.sqlpackage/162.0.52/microsoft.sqlpackage/162.0.52/tools/net6.0/any/sqlpackage.dll`
and
`DOTNET_ROOT=/opt/dotnet-sdk-bin-6.0 sqlpackage`

From what I understood, it is the intended behaviour that eselect-dotnet does not set DOTNET_ROOT, but I wish it did, and I can't come up with a scenario where this will break something.
Comment 1 Maciej Barć gentoo-dev 2023-09-24 21:08:08 UTC
Support for writing env is on master: https://gitlab.gentoo.org/dotnet/eselect-dotnet/-/blob/master/dotnet.eselect?ref_type=heads
Comment 2 Larry the Git Cow gentoo-dev 2023-09-26 16:28:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8a841709e07a0b2b1a02e312f5a04ed47123d2f

commit d8a841709e07a0b2b1a02e312f5a04ed47123d2f
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2023-09-26 16:11:44 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2023-09-26 16:28:14 +0000

    app-eselect/eselect-dotnet: bump to 1.0.0
    
    Closes: https://bugs.gentoo.org/914431
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-eselect/eselect-dotnet/Manifest                   |  1 +
 .../eselect-dotnet/eselect-dotnet-1.0.0.ebuild        | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)