missing "sudo apt-get install" instructions when more than one package provides a binary

Bug #1372999 reported by Dustin Kirkland 
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Medium
Unassigned

Bug Description

<sabdfl> landscape@maas-1-14:~$ flex
<sabdfl> The program 'flex' can be found in the following packages:
<sabdfl> * flex
<sabdfl> * flex-old
<sabdfl> Ask your administrator to install one of them
<sabdfl> when did that change from "sudo apt-get install" one of those packages?
<sabdfl> most people are their own administrator and won't know who to ask :)

...

<kirkland> elif len(packages) > 1:
<kirkland> packages.sort(key=cmp_to_key(self.sortByComponent))
<kirkland> print(_("The program '%s' can be found in the following packages:") % command, file=sys.stderr)
<kirkland> you get that message when the command can be found in multiple packages

Looks like it's been that way for a little while, at least.

It would be great if command-not-found would show the "sudo apt-get install" instructions, for each package in this case. It's friendlier, and really handy to have the text to copy and paste (if you are the administrator).

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

@mpt, can you have a look, and help guide the UI/UX for this bit?

@cjwatson, you also might have a suggestion/fix in mind :-)

Thanks!
Dustin

Changed in command-not-found (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Yeah, it's been like that forever. I'm open to making changes BUT I cannot upload any changes to this package so I kind of lost interest in pushing changes

Revision history for this message
Dustin Kirkland  (kirkland) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

BTW: this is also because the user didn't have the right to install packages

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Ah, no I was wrong.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

_so_ in any case, if someone can hand me the rights to this package I could work on fixing it (and other bugs)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers