Hide Forgot
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
yum command output is not meant to be scriptable. You can use repoquery, or write python to talk to the yum API directly.
(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.
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!!
Created attachment 510970 [details] New script and output see comment 3 See Comment 3