Bug 864177

Summary: 'subscription-manager list --available' and '--consumed' have issues displaying some long Subscription Names properly
Product: Red Hat Enterprise Linux 6 Reporter: Matt Reid <mreid>
Component: subscription-managerAssignee: John Sefler <jsefler>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, bkearney, jsefler
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.1.4-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:58:51 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    
Attachments:
Description Flags
sub-man list available formatting error
none
formatting for subscription names based on stty
none
formatting for long Subscription Names, Product Names, and Provides on a 45 column wide stty none

Description Matt Reid 2012-10-08 19:23:45 UTC
Description of problem:
I'm not sure what the issue is, but not all of our Subscription Names display properly when shown at the default 80 character terminal size from list --available or --consumed.

For example, --available when registered to Hosted, SKU RV0116512 displays as:
Subscription Name:      60-day Supported Red Hat Enterprise Virtualization for S
ervers
                        (8 Sockets) Evaluation

Most other Subscription Names if they need more room properly drop to the next line, and are indented to be even with the start of the Subscription Name.

So SKU RV0116512 should show as:
Subscription Name:      60-day Supported Red Hat Enterprise Virtualization for
                        Servers (8 Sockets) Evaluation

Version-Release number of selected component (if applicable):
SKU RV0116512 shows this way in subscription-manager-1.0.2 and 1.1.2-1.git

When registered to stage as stacking-stage to the admin org, none of the SKUs display properly in --consumed or --available. SKU RH014909F3 isn't indented properly when (Up to 4 guests) is displayed on a 2nd line (using --consumed).

SKU RH0197181 has the "ts)" from "(1-2 sockets)" drop down a line, and is not indented.

SKU RH101594 is split across 3 lines and incorrectly indented. "(Up " is on its own line, unindented, and "to 1 guest)" is properly indented on a 3rd line. 

SKU RH014909F3 is also split across 3 lines and incorrectly indented. "(Up " is again on a 2nd line by itself, incorrectly indented, and "to 4 guests" is properly indented on a 3rd line. This differs from the behavior noted above using --consumed to display the same SKU, the string is split differently in --available.

Additional info:
Not sure if this is in fact a subscription-manager issue or something wrong with the subscription names, since many subscriptions do show properly.

Comment 1 Matt Reid 2012-10-08 19:24:41 UTC
Created attachment 623668 [details]
sub-man list available formatting error

Comment 2 Bryan Kearney 2012-10-31 18:42:21 UTC
fixed in master at c75dffe47d7ecd2167152829f112521d36bbc005

Comment 4 Adrian Likins 2012-11-08 22:49:07 UTC
commit c75dffe47d7ecd2167152829f112521d36bbc005
Author: Bryan Kearney <bkearney>
Date:   Wed Oct 31 14:35:20 2012 -0400

    864177: Add the count for the first word in calculating where to break the line

Comment 6 John Sefler 2012-11-16 19:36:11 UTC
Created attachment 646555 [details]
formatting for subscription names based on stty

[root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager
subscription-manager-1.1.8-1.el6.x86_64

See attached screenshot

list --available works Grrrreat! on long sub names for various stty cols sizes
list --consumed fails
list --installed also fails

Moving back to ASSIGNED.

Comment 8 Bryan Kearney 2012-11-19 13:15:26 UTC
commit 10cf879e403cf088b19246685e31b089a7ee1119
Author: Bryan Kearney <bkearney>
Date:   Fri Nov 16 15:46:05 2012 -0500

    864177: Apply the new name wrapping logic to installed and consumed paths of the list command.

Comment 10 John Sefler 2012-11-20 20:46:13 UTC
Created attachment 648829 [details]
formatting for long Subscription Names, Product Names, and Provides on a 45 column wide stty

Verified Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.10-1.el6.x86_64

See attached screenshot that shows a much nicer wrapping of the Subscription Name, Product Name, and Provides in the subscription-manager list [--available|--consumed|--installed]

Comment 12 errata-xmlrpc 2013-02-21 08:58:51 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-2013-0350.html