[Yum] Feature request ... or How to.
James Antill
james-yum at and.org
Mon May 3 18:03:47 UTC 2010
John Reiser <jreiser at bitwagon.com> writes:
>> yum list installed
>>
>> it even tells you which repo the pkgs came from.
>
> The formatting is not friendly to scripts. It's OK to introduce
> a line break to insure columnar format for a terminal,
> but output to a plain file should put all the info for one package
> onto just one line.
>
> $ yum list installed > yum.out # redirect stdout to an IF_REG file
> $ more yum.out
> [[snip]]
> NetworkManager.x86_64 1:0.7.2.995-2.git20100225.fc11
> @updates
> [[snip]]
>
> Notice the line break between the version "...fc11" and the repo 'updates'.
> This makes the info hard to parse using 'read' in bash, for instance.
> Also there are mystery repos such as 'installed':
> ConsoleKit.x86_64 0.3.0-8.fc11 installed
Note that yum itself is not designed to be used like that, however
you can use:
% repoquery --pkgnarrow=installed --qf '%{name}.%{arch} %{epoch}:%{version}-%{release} %{ui_from_repo}' -a
--
James Antill -- james at fedoraproject.org
http://yum.baseurl.org/wiki/releases
http://yum.baseurl.org/wiki/whatsnew/3.2.28
http://yum.baseurl.org/wiki/YumMultipleMachineCaching
More information about the Yum
mailing list