Bug 756797

Summary: The output from command "yum list available" is different in case of redirection.
Product: Red Hat Enterprise Linux 6 Reporter: Dimitar Yordanov <dyordano>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1   
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: 2011-11-29 20:58:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.