I said i would write about zypper's XML output almost two months ago. Hm... obviously other stuff gained higher priority (i will get back to the XML output later). In the openSUSE Updater applets, the focus has shifted from the zypp back-end to PackageKit and i focused on other zypper/libzypp features and fixes. I will write about them in the following few posts.
Just recently i re-enabled all the original zypper search functionality (except --match-all which will be hopefully comming soon). Apart from the original features, there is one frequently requested change in the presenation of the search results (and thanx to the zypp and sat-solver guys it is also fast :O).
The old zypper listed all available instances of a matching package, all versions from all repositories. But people are more often interested in what the package is about than what versions are available from each respository. Hence, since 0.11.1 you will see a list of packages grouped by their names and types with a summary column instead of repository and version column:
$ zypper search browser
Reading installed packages...
S | Name | Summary | Type
--+---------------------+----------------------------------+--------
i | kim-browser | CIM Browser for CIM-XML Protocol | package
| mysql-query-browser | A Graphical MySQL Query Shell | package
| tvbrowser | digital TV guide | package
This output caught a few users unprepared. I hope learning that --details/-s can turn on a detailed list similar to the old one satisfied most of them:
$ zypper search -s browser
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+---------------------+---------+------------+--------+-----------
i | kim-browser | package | 0.3-208 | x86_64 | factory
v | kim-browser | package | 0.3-208 | i586 | factory
| mysql-query-browser | package | 5.0r12-183 | x86_64 | factory
| mysql-query-browser | package | 5.0r12-183 | i586 | factory
| tvbrowser | package | 2.6.3-22 | noarch | factory
Since zypper 0.11.2 the summaries will be abbreviated as needed to fit the width of your console screen. This is how it looks on an 80 character wide console:
$ search music
Reading installed packages...
S | Name | Summary | Type
--+-----------------------+-----------------------------------------+-----------
| asc-music | Music for Advanced Strategic Command--> | package
| libmusicbrainz | Library That Provides Access to the M-> | srcpackage
| libmusicbrainz-devel | Include Files and Libraries Mandatory-> | package
| libmusicbrainz3 | Library That Provides Access to the M-> | srcpackage
| libmusicbrainz3-6 | Library That Provides Access to the M-> | package
| libmusicbrainz3-devel | Library That Provides Access to the M-> | package
i | libmusicbrainz4 | Library That Provides Access to the M-> | package
| texlive-bin-musictex | MusiXTeX and MusicTeX | package
| texlive-musictex | MusiXTeX and MusicTeX | package
Of course you can use --no-abbrev/-A global option to turn the abbreviation off - the output will be messy, but you can read the whole summaries. Another way to obtain this info is to use zypper info.
...and don't forget to try zypper help search, zypper has nice help texts :O) I'll be fixing zypper update and writing a lot of documentation in the meantime.
1 comment:
Hello!
How to output only names???
Ex:
kim-browser
mysql-query-browser
tvbrowser
...
?
It needs for export to file.
Post a Comment