Bug 1094869

Summary: on rhel5, bash-completion of rhsm-icon options should show -? instead of -h
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.11CC: bkearney
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: 2014-09-16 00:22:59 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: 1039651    

Description John Sefler 2014-05-06 16:22:33 UTC
Description of problem:
On rhel6 and rhel7, rhsm-icon option -h correctly tab completes.  However on rhel5, the -h option is replaced by -?.   As a result, tab completion on rhel5 should include -? and exclude -h.


Version-Release number of selected component (if applicable):
[root@jsefler-5 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.10.1-1
subscription-manager: 1.11.3-2.git.3.266ce1e.el5
python-rhsm: 1.11.3-2.git.1.84fe37c.el5
[root@jsefler-5 ~]# rpm -q bash-completion
bash-completion-1.3-7.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-5 ~]# rhsm-icon -?
Usage:
  rhsm-icon [OPTION...] 

Help Options:
  -?, --help                  Show help options
  --help-all                  Show all help options
  --help-gtk                  Show GTK+ Options

Application Options:
  -c, --check-period          how often to check for validity (in seconds)
  -d, --debug                 show debug messages
  -f, --force-icon=TYPE       force display of the icon (expired, partial or warning)
  -i, --check-immediately     run the first status check right away
  --display=DISPLAY           X display to use

[root@jsefler-5 ~]# rhsm-icon -h
option parsing failed: Unknown option -h

^^ That is correct

[root@jsefler-5 ~]# rhsm-icon -<TAB><TAB>
-c                   --force-icon
--check-immediately  -h
--check-period       --help
-d                   --help-all
--debug              --help-gtk
--display            -i
-f     

The "-h" in the actual tab completion results above should be "-?" on rhel5.  Note: on rhel6 and rhel7 it should remain "-h".

Comment 1 John Sefler 2014-05-06 16:27:16 UTC
The same failure exists for rhsmcertd...

[root@jsefler-5 ~]# rhsmcertd -?
Usage:
  rhsmcertd [OPTION...] 

Help Options:
  -?, --help                             Show help options

Application Options:
  --cert-interval=MINUTES                deprecated, see --cert-check-interval
  -c, --cert-check-interval=MINUTES      interval to run cert check (in minutes)
  --heal-interval=MINUTES                deprecated, see --auto-attach-interval
  -i, --auto-attach-interval=MINUTES     interval to run auto-attach (in minutes)
  -n, --now                              run the initial checks immediately, with no delay
  -d, --debug                            show debug messages


[root@jsefler-5 ~]# rhsmcertd -<TAB><TAB>
--auto-attach-interval  -d                      --help
-c                      --debug                 -i
--cert-check-interval   -h                      -n
--cert-interval         --heal-interval         --now

^^ That tab completion list should show -? instead of -h on rhel5 only.

Comment 2 RHEL Program Management 2014-05-06 16:48:38 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 Carter Kozak 2014-05-30 15:00:57 UTC
commit 8d9ba1cee1b753eae44ec482f71b852f6bb9cc80
Author: ckozak <ckozak>
Date:   Fri May 30 11:00:41 2014 -0400

    1094869: fix rhsm-icon bash completion

Comment 6 John Sefler 2014-06-11 15:02:54 UTC
Verifying Version....
[root@jsefler-5 ~]# rpm -q subscription-manager
subscription-manager-1.11.3-6.el5

[root@jsefler-5 ~]# rhsmcertd -h
Invalid argument specified: -h
For more information run: rhsmcertd --help
[root@jsefler-5 ~]# rhsmcertd -<TAB><TAB>
-?                      --cert-interval         --help
--auto-attach-interval  -d                      -i
-c                      --debug                 -n
--cert-check-interval   --heal-interval         --now
[root@jsefler-5 ~]# rhsmcertd -?
Usage:
  rhsmcertd [OPTION...] 

Help Options:
  -?, --help                             Show help options

Application Options:
  --cert-interval=MINUTES                deprecated, see --cert-check-interval
  -c, --cert-check-interval=MINUTES      interval to run cert check (in minutes)
  --heal-interval=MINUTES                deprecated, see --auto-attach-interval
  -i, --auto-attach-interval=MINUTES     interval to run auto-attach (in minutes)
  -n, --now                              run the initial checks immediately, with no delay
  -d, --debug                            show debug messages

[root@jsefler-5 ~]# 

VERIFIED: tab completion for rhsmcertd includes -?

Comment 7 John Sefler 2014-06-11 15:05:09 UTC
Verifying Version....
[root@jsefler-5 ~]# rpm -q subscription-manager-gui
subscription-manager-gui-1.11.3-6.el5

[root@jsefler-5 ~]# rhsm-icon -h
option parsing failed: Unknown option -h
[root@jsefler-5 ~]# rhsm-icon -<TAB><TAB>
-?                   --debug              --help-all
-c                   --display            --help-gtk
--check-immediately  -f                   -i
--check-period       --force-icon         
-d                   --help               
[root@jsefler-5 ~]# rhsm-icon -? 
Usage:
  rhsm-icon [OPTION...] 

Help Options:
  -?, --help                  Show help options
  --help-all                  Show all help options
  --help-gtk                  Show GTK+ Options

Application Options:
  -c, --check-period          how often to check for validity (in seconds)
  -d, --debug                 show debug messages
  -f, --force-icon=TYPE       force display of the icon (expired, partial or warning)
  -i, --check-immediately     run the first status check right away
  --display=DISPLAY           X display to use

[root@jsefler-5 ~]#

VERIFIED: tab completion for rhsm-icon includes -?

Comment 10 errata-xmlrpc 2014-09-16 00:22:59 UTC
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-2014-1225.html