Bug 1158548 - [rfe] "dnf <plugin> --help" does not print plugin help
[rfe] "dnf <plugin> --help" does not print plugin help
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Fedora Extras Quality Assurance
:
: 1235521 1298801 1324093 1326094 1329609 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-29 11:43 EDT by Miroslav Suchý
Modified: 2016-10-04 15:04 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 03:21:38 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-10-29 11:43:34 EDT
Description of problem:
"dnf <plugin> --help" does not print plugin help.

Version-Release number of selected component (if applicable):
dnf-0.6.2-1.fc21.noarch

How reproducible:
always

Steps to Reproduce:
1. dnf install dnf-plugins-core
2. dnf copr --help
3. dnf copr
Actually you can try this for every plugin.

Actual results:
help for dnf is printed

Expected results:
help for just that plugin should be printed.
Comment 1 Parag Nemade 2014-10-29 12:02:34 EDT
actually its used as

dnf help <plugin>
Comment 2 Miroslav Suchý 2014-10-29 12:07:41 EDT
That is non intuitive. Feel free to flip it from bug report to RFE then.
Comment 3 Tim Lauridsen 2014-10-30 02:38:46 EDT
It is a little complex

dnf work the same ways as yum

dnf <whatever> --help shows the main help all cmds and main options

dnf help <cmd> will show the usage for <cmd>

special for dnf:

some cmds like repoquery, download supports

dnf repoquery --help-cmd

there will show help for cmd extra options and arguments.

man dnf.plugin.<cmd> 

will show the man page for the given plugin <cmd>

if copr was changed to use the special plugin arguments parser the

dnf copr --help-cmd would work and dnf copr with no arguments would show a more
detailed help about the arguments and could handle options in a better ways.
look at the source for repoquery & download plugin.

I have played with an idea that dnf should supply an argument sub parser to the plugin, but that have some big limitations, that only one plugin can add a given option like --source and that every single plugin dependend on other installed and that is a mess.

we should work on dnf supply a dedicated argument parser for each command internal & external (plugin), so --help-cmd will work for every command.
but that will need changes to all internal and external commands.
Comment 4 Radek Holy 2015-06-25 11:16:51 EDT
*** Bug 1235521 has been marked as a duplicate of this bug. ***
Comment 5 Fedora End Of Life 2015-11-04 05:19:40 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Honza Silhan 2016-01-19 09:46:36 EST
*** Bug 1298801 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Mracek 2016-04-11 07:40:30 EDT
*** Bug 1324093 has been marked as a duplicate of this bug. ***
Comment 8 Honza Silhan 2016-04-18 08:33:55 EDT
*** Bug 1326094 has been marked as a duplicate of this bug. ***
Comment 9 Igor Gnatenko 2016-04-24 02:46:03 EDT
*** Bug 1329609 has been marked as a duplicate of this bug. ***
Comment 10 Nick Coghlan 2016-04-28 23:00:51 EDT
Just noting that this is now affecting fedup in F23 (since that's just an alias for dnf system-upgrade):

$ fedup --help
usage: dnf [options] COMMAND

List of Main Commands

autoremove                
check-update              Check for available package upgrades
clean                     Remove cached data
(... etc)

(`man fedup` *does* work as expected, though, opening up the dnf system-upgrade page)
Comment 11 Michael Mráka 2016-05-26 03:21:38 EDT
Fixed as a part of DNF 2.0 argument parser rewrite
https://github.com/rpm-software-management/dnf/pull/474
Comment 12 jibecfed 2016-10-04 15:04:33 EDT
thank you for fixing this :)

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