Re: yum list available weird output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerry Reno wrote:
Gerry Reno wrote:
Seth Vidal wrote:


On Tue, 5 May 2009, Gerry Reno wrote:

Seth Vidal wrote:


On Tue, 5 May 2009, James Antill wrote:

Gerry Reno <greno@xxxxxxxxxxx> writes:

I run this command:
yum -q list available $(rpm -qa --queryformat=%{name}\n) | grep "^ "
1.0.0-2.fc11
preupgrade
0.1.0-6.fc11
preupgrade

Pipe the "yum list available" output through less, and you'll see
what is happening. In general we don't recommend screen scrapping yum
output, writing a yum script is often significantly easier (and
supported).

For what I _think_ you are trying to do above, you probably just want
"yum list updates" or "yum check-update" output.

and if you feel you MUST use a script to do this: look at repoquery from yum-utils.

-sv
Ok, through 'less' I can see that the output is being forced onto a second line. But rather than do that, it would be better to just push the output out by $COLUMNS and it would look exactly the same but still be on the same line.

did you see what I just said?

yum is NOT intended to be screen scraped. Either write a python script or use repoquery.

I get your point. But people do scrape these outputs for quick scripts. If you put it on stdout people are going to scrape it pretty much. Anyway, I'll look at making a python script.

Ok, I am looking at repoquery but some of the totals do not seem to add up. For example:
repoquery -q --pkgnarrow=updates -a | wc -l
498

Now I would expect that when I do this:
for arch in i386 i586 i686 x86_64; do
Oops misquote : the line should have read: for arch in i386 i586 i686 x86_64 noarch; do
repoquery -q --pkgnarrow=updates --archlist=$arch | wc -l
done

that the totals for all the arches would equal the 'all' total. But they don't. The arches totalled separately add up to more than 100 packages more than the 'all' total. How can that be?

Regards,
Gerry

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum


_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux