Bug 1158548 - [rfe] "dnf <plugin> --help" does not print plugin help
Summary: [rfe] "dnf <plugin> --help" does not print plugin help
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Fedora Extras Quality Assurance
: 1235521 1298801 1324093 1326094 1329609 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2014-10-29 15:43 UTC by Miroslav Suchý
Modified: 2016-10-04 19:04 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-26 07:21:38 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Miroslav Suchý 2014-10-29 15:43:34 UTC
Description of problem:
"dnf <plugin> --help" does not print plugin help.

Version-Release number of selected component (if applicable):

How reproducible:

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 16:02:34 UTC
actually its used as

dnf help <plugin>

Comment 2 Miroslav Suchý 2014-10-29 16:07:41 UTC
That is non intuitive. Feel free to flip it from bug report to RFE then.

Comment 3 Tim Lauridsen 2014-10-30 06:38:46 UTC
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 15:16:51 UTC
*** Bug 1235521 has been marked as a duplicate of this bug. ***

Comment 5 Fedora End Of Life 2015-11-04 10:19:40 UTC
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 14:46:36 UTC
*** Bug 1298801 has been marked as a duplicate of this bug. ***

Comment 7 Jaroslav Mracek 2016-04-11 11:40:30 UTC
*** Bug 1324093 has been marked as a duplicate of this bug. ***

Comment 8 Honza Silhan 2016-04-18 12:33:55 UTC
*** Bug 1326094 has been marked as a duplicate of this bug. ***

Comment 9 Igor Gnatenko 2016-04-24 06:46:03 UTC
*** Bug 1329609 has been marked as a duplicate of this bug. ***

Comment 10 Nick Coghlan 2016-04-29 03:00:51 UTC
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

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 07:21:38 UTC
Fixed as a part of DNF 2.0 argument parser rewrite

Comment 12 jibecfed 2016-10-04 19:04:33 UTC
thank you for fixing this :)

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