Bug 716644

Summary: yum list command adds extra line when version text is long
Product: [Fedora] Fedora Reporter: redhatbug <mjmccaffrey>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: ffesti, james.antill, maxamillion, pmatilai, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 18:34:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Output of command at 1. of Steps to reproduce
none
New script and output see comment 3 none

Description redhatbug 2011-06-25 23:19:33 UTC
Created attachment 509932 [details]
Output of command at 1. of Steps to reproduce

Description of problem:

The yum list command adds an extra line (splits a line) when version of package is too long.

Output of the list command cannot therefore be parsed and the output is unreliable

Version-Release number of selected component (if applicable):
yum-3.2.29-6.fc15.noarch

How reproducible:
Whenever version text is long

Steps to Reproduce:
1. Execute the following command
[root@mbeast ~]# yum list updates --enablerepo=fl-u-t \
> | grep -v "Loaded plugins" \
> | grep -v "Updated Packages" \
> | awk '{print $1}' \
> | nl >yumlist.look

(fl-u-t is my updates-testing repo)

2.
Examine lines 34 and 75 of the output file yumlist.look 
(yumlist.look is attached)
Line 34 contains (on its own) the version number of the program on line 33
Line 75 contains (on its own) the repo name of the program on line 74

3.
  
Actual results:
Split lines which should be single lines

Expected results:
One line per package

Additional info:
See atached output yumlist.look

Comment 1 James Antill 2011-06-27 18:34:32 UTC
yum command output is not meant to be scriptable. You can use repoquery, or write python to talk to the yum API directly.

Comment 2 redhatbug 2011-07-01 00:58:47 UTC
(In reply to comment #1)
> yum command output is not meant to be scriptable. You can use repoquery, or
> write python to talk to the yum API directly.

That's a shame. All that output and its not parseable (did not say scriptable) and I do think it would be useful if the output were consistent.  Just wanted a quick way to see what updates would be included if the testing repo was enabled. rpm (query options) and repoquery are powerful tools but take time to use but will remember to use them instead.

Comment 3 redhatbug 2011-07-02 05:07:35 UTC
Perhaps it is parseable after all see attached script and output in archive sedyum.zip.
What I was after was a list of updates from which I could delete those I did not want. In particular installation of the qt update was changing all the fonts in the kde workspace and Konsole to a rather anaemic one.
Now that I have installed all the testing updates I wanted by passing the edited list from the script to yum the script now only lists (in the output attached) those testing updates I did no want!!

Comment 4 redhatbug 2011-07-02 05:09:14 UTC
Created attachment 510970 [details]
New script and output see comment 3

See Comment 3