Bug 854374
| Summary: | rct --help String & Layout Updates | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Matt Reid <mreid> |
| Component: | subscription-manager | Assignee: | Bryan Kearney <bkearney> |
| Status: | CLOSED ERRATA | QA Contact: | Entitlement Bugs <entitlement-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4 | CC: | bkearney, jsefler |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 08:55:56 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 771481, 840993 | ||
pull request which does this: [bkearney@bkearney bin]$ ./rct --help Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help] Primary Modules: cat-cert Print certificate information stat-cert Print certificate statistics and sizes fixed in master at f32a5c5f1924c135320ed288fe6042dbc279d64c [root@jsefler-6 ~]# rpm -q subscription-manager subscription-manager-1.1.10-1.el6.x86_64 [root@jsefler-6 ~]# rct --help Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help] Primary Modules: cat-cert Print certificate information stat-cert Print certificate statistics and sizes [root@jsefler-6 ~]# The layout for rct --help shown above is now consistent with the layout of subscription-manager --help It is also consistent with bug 848095 and bug 876692 However... (In reply to comment #0) > Most of our other tooling doesn't have the extra new lines before starting > the Usage section, neither does the cat-cert module within rct. This was not addressed; more to follow in the next comment. Regarding the extra new line before the Usage statement, we are totally inconsistent across our subscription-manager cli tools. As shown below, there are three different styles plus two forms for "[OPTIONS]" versus "[OPTION...]"
[root@jsefler-6 ~]# subscription-manager-gui --help | head -2
Usage: subscription-manager-gui [OPTIONS] <==== NO LINE
[root@jsefler-6 ~]# subscription-manager --help | head -2
<==== EXTRA LINE
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]
[root@jsefler-6 ~]# rhsm-icon --help | head -2
Usage: <==== SPLIT LINE
rhsm-icon [OPTION...]
[root@jsefler-6 ~]# rhsmcertd --help | head -2
Usage: <==== SPLIT LINE
rhsmcertd [OPTION...]
[root@jsefler-6 ~]# rct --help | head -2
<==== EXTRA LINE
Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help]
[root@jsefler-6 ~]# /usr/libexec/rhsmd --help | head -2
Usage: rhsmd [OPTIONS] <==== NO LINE
[root@jsefler-6 ~]# /usr/libexec/rhsmcertd-worker --help | head -2
Usage: rhsmcertd-worker [OPTIONS] <==== NO LINE
[root@jsefler-6 ~]# rhn-migrate-classic-to-rhsm --help | head -2
Usage: rhn-migrate-classic-to-rhsm [OPTIONS] <==== NO LINE
[root@jsefler-6 ~]# rct cat-cert --help | head -2
Usage: rct cat-cert [OPTIONS] CERT_FILE <==== NO LINE
[root@jsefler-6 ~]# rct stat-cert --help | head -2
Usage: rct stat-cert [OPTIONS] CERT_FILE <==== NO LINE
[root@jsefler-6 ~]#
Personally, I prefer the NO LINE format. Deferring to mreid how to proceed.
We talked about the split Usage statements and the [OPTIONS] vs [OPTION...] as part of https://bugzilla.redhat.com/show_bug.cgi?id=876692. Unfortunately, its a pretty involved change to alter those, it isn't just a simple string change. The good news is we were able to clean things up to just the two different option formats. We should try to keep things as consistent as we can though and not use extra lines before the Usage statement. These both have a newline before the Usage statement that we should try to remove: #rct --help #rct cat-cert --help This is already correct and doesn't have a newline: #rct stat-cert --help Verifying Version... [root@jsefler-6 ~]# rpm -q subscription-manager subscription-manager-1.1.11-1.el6.x86_64 [root@jsefler-6 ~]# subscription-manager-gui --help | head -2 Usage: subscription-manager-gui [OPTIONS] [root@jsefler-6 ~]# subscription-manager --help | head -2 Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help] [root@jsefler-6 ~]# rhsm-icon --help | head -2 Usage: rhsm-icon [OPTION...] [root@jsefler-6 ~]# rhsmcertd --help | head -2 Usage: rhsmcertd [OPTION...] [root@jsefler-6 ~]# rct --help | head -2 Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help] [root@jsefler-6 ~]# /usr/libexec/rhsmd --help | head -2 Usage: rhsmd [OPTIONS] [root@jsefler-6 ~]# /usr/libexec/rhsmcertd-worker --help | head -2 Usage: rhsmcertd-worker [OPTIONS] [root@jsefler-6 ~]# rhn-migrate-classic-to-rhsm --help | head -2 Usage: rhn-migrate-classic-to-rhsm [OPTIONS] [root@jsefler-6 ~]# rct cat-cert --help | head -2 Usage: rct cat-cert [OPTIONS] CERT_FILE [root@jsefler-6 ~]# rct stat-cert --help | head -2 Usage: rct stat-cert [OPTIONS] CERT_FILE [root@jsefler-6 ~]# Not sure who made the changes, but all of the extra new lines before the usage statement have disappeared. As noted in comment 8, we will tolerate the split usage lines for rhsm-icon and rhsmcertd. Moving this bugzilla status to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0350.html |
Description of problem: There seems to be some unnecessary spacing in --help for rct. Current output: [root@localhost ~]# rct --help Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help] Primary Modules: cat-cert Print certificate info to standard output. Other Modules (Please consult documentation): [root@localhost ~]# Seems like we could eliminate the double new line before Usage, and one of the two lines after it. If there aren't any other modules, I'd rather we not include that line until we need to. It doesn't look like we have a man page yet, so telling them to consult the documentation will probably just result in frustration. We should also capitalize the o in options within the output of "rct cat-cert --help". Does "Print certificate info to standard output." mean anything more than just printing out that information? In subscription-manager --help, we describe version as "Print version information". Desired output: [root@localhost ~]# rct --help Usage: rct MODULE-NAME [MODULE-OPTIONS] [--help] Primary Modules: cat-cert Print certificate info to standard output. [root@localhost ~]# ----- Most of our other tooling doesn't have the extra new lines before starting the Usage section, neither does the cat-cert module within rct. Version: 1.0.17-1