Bug 621495 - 'yum list' wraps output when called from script
Summary: 'yum list' wraps output when called from script
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-05 09:43 UTC by Rich Boyce
Modified: 2014-01-21 23:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-05 13:09:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rich Boyce 2010-08-05 09:43:49 UTC
Description of problem:
'yum list' output wraps at 93(?) columns, even when yum is called from a script. The size of the terminal used does not affect this. An alternative, more machine-readable output should be provided (at least one that does not wrap).

Version-Release number of selected component (if applicable):
3.2.25-1.fc12

How reproducible:
every time

Steps to Reproduce:
1. write script that parses output of 'yum list \*' line-by-line
2. 
3.
  
Actual results:
Some lines fail to be parsed due to yum wrapping them onto two lines

Expected results:
All lines should have the same pattern of output, no matter their length. Lines should not be wrapped.

Additional info:

Comment 1 seth vidal 2010-08-05 12:48:53 UTC
repoquery can access the same information yum can and you can structure the output from it however you want.
screenscraping with yum is not a good idea but w/repoquery it is.

Also - try yum 3.2.28 from updates-testing and see if it doesn't do lots of things better.

Comment 2 Rich Boyce 2010-08-05 13:09:56 UTC
Thanks - repoquery looks like just what I need, but I'm stuck on F12 for the time being. I'll switch to repoquery when I move to F14 later this year. I'll also try yum 3.2.28 (or later) at that point.

Comment 3 seth vidal 2010-08-05 13:15:16 UTC
repoquery is in yum-utils in f12 right now.

It was in f12 from the first day f12 was released. repoquery has been around for quite a while, now.

Also - 3.2.28-1 is in updates-testing for f12 as well.

Comment 4 Rich Boyce 2010-08-05 13:19:28 UTC
Great, thanks for letting me know. I'll check it out. I fell into the trap of thinking binary name == package name. Urk.


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