Bug 1266680 - UX: when --help on plugin is executed the options of plugin and DNF itself should be separated
UX: when --help on plugin is executed the options of plugin and DNF itself sh...
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core (Show other bugs)
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Michael Mráka
Fedora Extras Quality Assurance
: Triaged, UserExperience
: 1356920 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2015-09-26 09:12 EDT by Bastien Nocera
Modified: 2017-06-08 09:49 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-06-08 09:49:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2015-09-26 09:12:28 EDT
I don't know how to use "dnf copr". How to enable it is linked from the COPR web pages. Not how to disable it.

Typing "dnf copr --help" gives out the dnf general help, nothing copr related. Typing "dnf copr garbage" actually gives out the help. There also seems to be nothing to list the locally enabled copr repos, so I could disable them.
Comment 1 Parag Nemade 2015-09-26 09:28:18 EDT
For dnf, help is used as
dnf help <cmd> 

so use "dnf help copr", you can even get help as
man dnf.plugin.copr

also see bug 1158548
Comment 2 Michal Luscon 2015-10-13 09:01:33 EDT
This could be fixed after merging of jsilhan's PR (https://github.com/rpm-software-management/dnf/pull/348/commits). The pull request also contains some plugin migration examples.
Comment 3 Michal Luscon 2016-07-18 07:20:48 EDT
*** Bug 1356920 has been marked as a duplicate of this bug. ***
Comment 4 Igor Gnatenko 2016-07-22 05:30:41 EDT
Michael, on nightly of DNF 2.0 it's still reproducible, partially.

It doesn't return real help of COPR plugin, but it returns options from main dnf cmd. Could you take a look?
Comment 5 Fedora End Of Life 2016-11-24 07:36:59 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 Michael Mráka 2016-11-30 04:13:50 EST
We can use option grouping in argparse to separate main vs. plugin options.
Comment 7 Fedora End Of Life 2017-02-28 04:49:30 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.
Comment 8 Jaroslav Mracek 2017-06-08 09:49:26 EDT
I tried it with dnf-2.5.0 and I got separation of command option with general option. First there is usage of command, then summary of command, then command/plugin options (optional arguments:), then general option (Optional arguments:). In the usage you can see that you can use key words {help,enable,disable,remove,list,search}. Additional information can be also found in documentation. I think that it is exactly what you requested, therefore I am closing it. But if you think that the output should be different, please don't hesitate to reopen the bug report with additional information.

sudo dnf copr --help
usage: dnf copr [-c [config file]] [-q] [-v] [--version]
                [--installroot [path]] [--nodocs] [--noplugins]
                [--enableplugin [plugin]] [--disableplugin [plugin]]
                [--releasever RELEASEVER] [--setopt SETOPTS] [--skip-broken]
                [-h] [--allowerasing] [-b] [-C] [-R [minutes]]
                [-d [debug level]] [--debugsolver] [--showduplicates]
                [-e ERRORLEVEL] [--obsoletes]
                [--rpmverbosity [debug level name]] [-y] [--assumeno]
                [--enablerepo [repo]] [--disablerepo [repo] | --repo [repo]]
                [-x [package]] [--disableexcludes [repo]]
                [--repofrompath [repo,path]] [--nogpgcheck] [--color COLOR]
                [--refresh] [-4] [-6] [--downloadonly] [--bugfix]
                [--enhancement] [--newpackage] [--security]
                [--advisory ADVISORY] [--bzs BUGZILLA] [--cves CVES]
                [--sec-severity {Critical,Important,Moderate,Low}]
                {help,enable,disable,remove,list,search} [arg [arg ...]]

Interact with Copr repositories.

optional arguments:
  --disablerepo [repo]
  --repo [repo], --repoid [repo]
                        enable just specific repositories by an id or a glob,
                        can be specified multiple times

Optional arguments:
  -c [config file], --config [config file]
                        config file location
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  --version             show DNF version and exit
  --installroot [path]  set install root
  --nodocs              do not install documentations
  --noplugins           disable all plugins
  --enableplugin [plugin]
                        enable plugins by name
  --disableplugin [plugin]
                        disable plugins by name
  --releasever RELEASEVER
                        override the value of $releasever in config and repo
  --setopt SETOPTS      set arbitrary config and repo options
  --skip-broken         resolve depsolve problems by skipping packages
  -h, --help, --help-cmd
                        show command help
  --allowerasing        allow erasing of installed packages to resolve
  -b, --best            try the best available package versions in
  -C, --cacheonly       run entirely from system cache, don't update cache
  -R [minutes], --randomwait [minutes]
                        maximum command wait time
  -d [debug level], --debuglevel [debug level]
                        debugging output level
  --debugsolver         dumps detailed solving results into files
  --showduplicates      show duplicates, in repos, in list/search commands
  -e ERRORLEVEL, --errorlevel ERRORLEVEL
                        error output level
  --obsoletes           enables dnf's obsoletes processing logic for upgrade
                        or display capabilities that the package obsoletes for
                        info, list and repoquery
  --rpmverbosity [debug level name]
                        debugging output level for rpm
  -y, --assumeyes       automatically answer yes for all questions
  --assumeno            automatically answer no for all questions
  --enablerepo [repo]
  -x [package], --exclude [package], --excludepkgs [package]
                        exclude packages by name or glob
  --disableexcludes [repo], --disableexcludepkgs [repo]
                        disable excludepkgs
  --repofrompath [repo,path]
                        label and path to additional repository, can be
                        specified multiple times.
  --nogpgcheck          disable gpg signature checking
  --color COLOR         control whether color is used
  --refresh             set metadata as expired before running the command
  -4                    resolve to IPv4 addresses only
  -6                    resolve to IPv6 addresses only
  --downloadonly        only download packages
  --bugfix              Include bugfix relevant packages, in updates
  --enhancement         Include enhancement relevant packages, in updates
  --newpackage          Include newpackage relevant packages, in updates
  --security            Include security relevant packages, in updates
  --advisory ADVISORY, --advisories ADVISORY
                        Include packages needed to fix the given advisory, in
  --bzs BUGZILLA        Include packages needed to fix the given BZ, in
  --cves CVES           Include packages needed to fix the given CVE, in
  --sec-severity {Critical,Important,Moderate,Low}, --secseverity {Critical,Important,Moderate,Low}
                        Include security relevant packages matching the
                        severity, in updates

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