dotnet command suggested as coming from dotnet-host package

Bug #2039097 reported by Mateus Rodrigues de Morais
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dotnet6 (Ubuntu)
Triaged
Low
Dominik Viererbe
dotnet7 (Ubuntu)
Triaged
Low
Dominik Viererbe
dotnet8 (Ubuntu)
Triaged
Low
Dominik Viererbe

Bug Description

On a box where dotnet is not installed, command-not-found will suggest `dotnet` as part of dotnet-host(7.0, 8.0), which is a package deep into the dotnet dependency tree that, if installed individually, does not yield a useful .NET installation, e.g.

```
$ dotnet
Command 'dotnet' not found, but can be installed with:
sudo snap install dotnet-sdk # version 7.0.402, or
sudo apt install dotnet-host # version 6.0.121-0ubuntu1
sudo apt install dotnet-host-7.0 # version 7.0.110-0ubuntu1
sudo apt install dotnet-host-8.0 # version 8.0.0~rc1-0ubuntu1
See 'snap info dotnet-sdk' for additional versions.
```

Even though that is the package that includes the `dotnet` binary, the recommendation should be overridden to either the dotnet* virtual packages, dotnet-sdk-*, or dotnet-runtime-*.

Revision history for this message
Steve Langasek (vorlon) wrote :

Note that the solution for this is to emit a 'Cnf-Visible-Pkgname' field in the binary package's control file. E.g.

Package: python3.11-minimal
Cnf-Visible-Pkgname: python3.11

You would then also need to ask the release team to regenerate the command-not-found database for affected releases (which I believe can be done post-release but is not habitually done).

Changed in dotnet8 (Ubuntu):
status: New → Confirmed
Changed in dotnet7 (Ubuntu):
status: New → Confirmed
Changed in dotnet6 (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in dotnet7 (Ubuntu):
importance: Undecided → Low
Changed in dotnet8 (Ubuntu):
importance: Undecided → Low
Revision history for this message
Dominik Viererbe (dviererbe) wrote :

The python packages had a similar problem. See LP: #1867157 as a reference for how they implemented it.

Changed in dotnet6 (Ubuntu):
status: Confirmed → Triaged
Changed in dotnet7 (Ubuntu):
status: Confirmed → Triaged
Changed in dotnet8 (Ubuntu):
status: Confirmed → Triaged
Changed in dotnet6 (Ubuntu):
assignee: nobody → Dominik Viererbe (dviererbe)
Changed in dotnet7 (Ubuntu):
assignee: nobody → Dominik Viererbe (dviererbe)
Changed in dotnet8 (Ubuntu):
assignee: nobody → Dominik Viererbe (dviererbe)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.