Bug 716644 - yum list command adds extra line when version text is long
Summary: yum list command adds extra line when version text is long
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-25 23:19 UTC by redhatbug
Modified: 2014-01-21 23:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-27 18:34:32 UTC
Type: ---


Attachments (Terms of Use)
Output of command at 1. of Steps to reproduce (2.08 KB, application/octet-stream)
2011-06-25 23:19 UTC, redhatbug
no flags Details
New script and output see comment 3 (437 bytes, application/zip)
2011-07-02 05:09 UTC, redhatbug
no flags Details

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


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