Re: Feature request ... or How to.

James Antill <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
John Reiser <[email protected]> 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 -- [email protected]
http://yum.baseurl.org/wiki/releases
http://yum.baseurl.org/wiki/whatsnew/3.2.28
http://yum.baseurl.org/wiki/YumMultipleMachineCaching
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.