Bug 864177 - 'subscription-manager list --available' and '--consumed' have issues displaying some long Subscription Names properly
'subscription-manager list --available' and '--consumed' have issues displayi...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: John Sefler
IDM QE LIST
:
Depends On:
Blocks: 771481 840993
  Show dependency treegraph
 
Reported: 2012-10-08 15:23 EDT by Matt Reid
Modified: 2013-02-21 03:58 EST (History)
3 users (show)

See Also:
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 03:58:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sub-man list available formatting error (53.46 KB, image/png)
2012-10-08 15:24 EDT, Matt Reid
no flags Details
formatting for subscription names based on stty (149.68 KB, image/png)
2012-11-16 14:36 EST, John Sefler
no flags Details
formatting for long Subscription Names, Product Names, and Provides on a 45 column wide stty (136.34 KB, image/png)
2012-11-20 15:46 EST, John Sefler
no flags Details

  None (edit)
Description Matt Reid 2012-10-08 15:23:45 EDT
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 15:24:41 EDT
Created attachment 623668 [details]
sub-man list available formatting error
Comment 2 Bryan Kearney 2012-10-31 14:42:21 EDT
fixed in master at c75dffe47d7ecd2167152829f112521d36bbc005
Comment 4 Adrian Likins 2012-11-08 17:49:07 EST
commit c75dffe47d7ecd2167152829f112521d36bbc005
Author: Bryan Kearney <bkearney@redhat.com>
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 14:36:11 EST
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 08:15:26 EST
commit 10cf879e403cf088b19246685e31b089a7ee1119
Author: Bryan Kearney <bkearney@redhat.com>
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 15:46:13 EST
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 03:58:51 EST
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

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