Bug 756797 - The output from command "yum list available" is different in case of redirection.
Summary: The output from command "yum list available" is different in case of redirec...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-24 15:46 UTC by Dimitar Yordanov
Modified: 2014-01-21 06:24 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-29 20:58:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dimitar Yordanov 2011-11-24 15:46:04 UTC
Description of problem:
The output from command "yum list available"  is different when it is  passed to pipe or redirected to a file.

Version-Release number of selected component (if applicable):
RHEL5/6
yum-3.2.29-17

How reproducible:
100%

Steps to Reproduce:
1. Create a custom channel to Satellite 
    custom_chann_sync_repo_thu24nov2011_10_16_39_28628
2. Register the server to Satellite with base channel 
    custom_chann_sync_repo_thu24nov2011_10_16_39_28628
3.yum clean all
4.yum list available
  
Actual results:

The following text is displayed in one line

test-regular-Test_RPM_0.x86_64                                     0.1-1                                    custom_chann_sync_repo_thu24nov2011_10_16_39_28628


If  you pass the output to pipe

#yum list available | grep  custom_chann_sync_repo_thu24nov2011_10_16_39_28628

 0.1-1            custom_chann_sync_repo_thu24nov2011_10_16_39_28628


if you redirected to a file:
# yum list available  > temp.txt
 
The result are broken  in more lines.

Expected results:
The  number of lines is alway the same, regardless if the output is displayed to the console or redirected.
The current behavior makes to processing of the output very complicated.

Additional info:

Comment 2 James Antill 2011-11-29 20:58:58 UTC
> The  number of lines is alway the same, regardless if the output is displayed
> to the console or redirected.

 Make your terminal 80 characters wide, as is the one true way, and this will be true.

> The current behavior makes to processing of the output very complicated.

 Don't do that then, we supply an API and repoquery/etc. so you can do things like that.


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