Bug 1267338

Summary: dnf system-upgrade --help doesn't provide help
Product: [Fedora] Fedora Reporter: Ralf Corsepius <rc040203>
Component: dnf-plugin-system-upgradeAssignee: Will Woods <wwoods>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame, wwoods, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugin-system-upgrade-0.7.0-1.fc23 dnf-plugin-system-upgrade-0.7.0-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-02 18:52:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralf Corsepius 2015-09-29 17:12:55 UTC
Description of problem:

dnf system-upgrade --help
nor
dnf --help system-upgrade
display any help/usage on the system-upgrade plugin.

Version-Release number of selected component (if applicable):
dnf-plugin-system-upgrade-0.4.1-1.fc22.noarch
dnf-1.1.1-2.fc22.noarch


Actual results:
dnf system-upgrade --help
displays "dnf --help"

Expected results:
dnf to display "system-upgrade" specific help.

Additional info:
"dnf system-upgrade"
displays the output I would expect from dnf system-upgrade --help

Comment 1 Will Woods 2015-09-30 14:53:43 UTC
This doesn't work for  *any* DNF subcommand. It's a side-effect of the way DNF parses command-line arguments.

Try, for example, "dnf repoquery --help", or "dnf update --help".

The correct command for this is "dnf help [subcommand]":

  [wwoods@metroid ~]$ dnf help system-upgrade
  system-upgrade [OPTIONS] [download --releasever=VERSION|reboot|clean]
  
  Prepare system for upgrade to a new release
  
  alias: fedup

For detailed help, *some* commands accept "--help-cmd" (e.g. repoquery, download, builddep, and other stuff from dnf-plugins-core). 
Most subcommands (install, upgrade, clean, erase, upgrade, group, etc.) don't.

"dnf system-upgrade" by itself will show the help message; I'll add "--help-cmd" for consistency with the rest of the plugins.

Beyond that, there's nothing I can really do here.

Comment 2 Ralf Corsepius 2015-09-30 14:57:42 UTC
(In reply to Will Woods from comment #1)
> This doesn't work for  *any* DNF subcommand. It's a side-effect of the way
> DNF parses command-line arguments.

OK, I expected as much ;)

> Beyond that, there's nothing I can really do here.
I think assigning this BZ to the dnf folks to raise awareness about this apparenty design flaw in dnf would be appropriate.

Comment 3 Will Woods 2015-09-30 16:20:35 UTC
Added 'help' and '--help-cmd':

  https://github.com/rpm-software-management/dnf-plugin-system-upgrade/commit/3d43430

Feel free to file a new bug (or clone this one) to track redesigning how DNF handles argument parsing for its plugins, but this one will be closed by the next release of the plugin.

Comment 4 Will Woods 2015-09-30 16:30:35 UTC
BAH WHOOPS. Re-assigning back to the plugin as intended. Sorry 'bout that.

Comment 5 Fedora Update System 2015-10-28 16:05:28 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-e00b75e39f

Comment 6 Fedora Update System 2015-10-28 16:05:28 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-69bef6b9ed

Comment 7 Fedora Update System 2015-11-01 06:58:45 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugin-system-upgrade'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-69bef6b9ed

Comment 8 Fedora Update System 2015-11-02 00:27:17 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugin-system-upgrade'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-e00b75e39f

Comment 9 Fedora Update System 2015-11-02 18:52:04 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-11-03 05:51:40 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.