Bug 1132335 - RFE [UX] - Give users hint on uknown command
RFE [UX] - Give users hint on uknown command
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-21 03:50 EDT by Miroslav Suchý
Modified: 2015-04-09 03:45 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-0.6.1-1.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-23 00:40:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2014-08-21 03:50:31 EDT
Description of problem:
When you run:
# dnf foo
No such command: foo. Please use /usr/bin/dnf --help

User have no idea where they can get command foo (in my case 'copr').
It would be nice to give them hints to either install dnf-plugins-core or check available plugins by running
 dnf search dnf-plugin

The same apply to running
 dnf foo --help
on unknown command.
Comment 1 Honza Silhan 2014-08-22 09:45:09 EDT
Hi, thanks for the report. We can blindly write message that it could be a plugin command. I don't think it's a good idea to store all commands from dnf-plugins-core in dnf.
Comment 2 Nick Coghlan 2014-08-25 01:43:16 EDT
Miroslav's idea of suggesting "dnf search dnf-plugin" wouldn't necessarily work all that well.

For example, in the specific case of the copr subcommand, that's provided by dnf-plugins-core, but the metadata search results don't indicate that.

An alternative might be to adopt a packaging recommendation that components providing dnf subcommands include a virtual provides for "dnf-command(command)". Then dnf could blindly suggest trying that, with it being up to the plugin package to supply them.

That is, something like:

$ dnf foo
No such command: foo. Please use 'dnf --help' or try 'dnf install dnf-command(foo)'
Comment 3 Miroslav Suchý 2014-08-25 04:26:31 EDT
I was suggesting 'dnf search dnf-plugin' only as option, so it give user hint, where the plugin can be.

But yes, having virtual provides dnf-command(foo) is very nice. I like it.
Comment 4 Ales Kozumplik 2014-08-25 07:45:20 EDT
(In reply to Jan Silhan from comment #1)
> Hi, thanks for the report. We can blindly write message that it could be a
> plugin command. I don't think it's a good idea to store all commands from
> dnf-plugins-core in dnf.

Yes, that's the best we can do. I would be against any random solutions like searching virtual provides etc, the use case is far too marginal to marginal to deserve extreme measures like that. git doesn't tell you the package you need to install when 'git send-email' doesn't exist either.
Comment 5 Honza Silhan 2014-08-25 08:51:47 EDT
I actually like Nick's idea - there would be no additional garbage in dnf code. We will only extend "no-such-command" message, after that it's up to the user what he will do. Provides in dnf-plugins-core wouldn't hurt. Additionally in Description should be named plugins or/and commands as well because of "dnf search" command. It's the same approach as in debian where if bash command you type doesn't exist in /usr/bin it gives you hint that you could try "apt-get install ...".
Comment 6 Honza Silhan 2014-08-28 08:47:56 EDT
Hint added to DNF and extended description of dnf-plugins-core which plugins it contains. Solution with provides was rejected - it's dependent on packaging format of plugins and we should treat the same rpm packed plugins, python eggs, etc.
Comment 7 Fedora Update System 2014-09-04 11:49:27 EDT
dnf-0.6.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-0.6.1-1.fc21
Comment 8 Fedora Update System 2014-09-05 20:59:57 EDT
Package dnf-0.6.1-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.6.1-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10199/dnf-0.6.1-1.fc21
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2014-09-23 00:40:11 EDT
dnf-0.6.1-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Radek Holy 2015-04-09 03:45:19 EDT
Hello, just in case that someone finds this report: We have cancelled the decision made in comment #4: see bug 1208773.

Note You need to log in before you can comment on or make changes to this bug.