[zypp-devel] new zypper search?
Hi! Would anybody object if a do the following: $ zypper search zypp S | Name | Summary | Type | Repository --+--------+---------------------------------+---------+----------- i | zypper | Command line package managem... | package | (multiple) I can tweak the abbreviation of the summary to your liking. There will also be --no-abbrev global option: $ src/zypper --no-abbrev search zypper S | Name | Summary | Type | Repository --+--------+----------------------------------------------------+---------+----------- i | zypper | Command line package management tool using libzypp | package | (multiple) The old solvable list still possible with --details/-s $ zypper search --details zypper S | Repository | Type | Name | Version | Arch --+------------+---------+--------+------------+------- i | @System | package | zypper | 0.10.4-8 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | x86_64 v | factory | package | zypper | 0.10.6-2 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | i586 v | factory | package | zypper | 0.10.6-2 | i586 I can move the Name column to the second position here, too. I also think about dropping the Type column, if --type is used. Rug compatibility will of course be preserved with -r global option. One more example attached (doesn't look good when wrapped). What do you think? Cheers, jano $ zypper search zypp Reading installed packages... S | Name | Summary | Type | Repository --+------------------------------+---------------------------------+------------+----------- i | libzypp | Package, Patch, Pattern, and... | package | (multiple) | libzypp-devel | Package, Patch, Pattern, and... | package | (multiple) | libzypp-testsuite-tools | Package, Patch, Pattern, and... | package | (multiple) | libzypp-testsuite-tools-data | Package, Patch, Pattern, and... | package | (multiple) i | ruby-zypp | Ruby bindings for libzypp | package | (multiple) i | ruby-zypptools | Tools for ZYpp | package | factory i | zypper | Command line package managem... | package | (multiple) | libzypp-bindings | Bindings for libzypp | srcpackage | (multiple) | libzypp-tools | Tools for ZYpp | srcpackage | factory $ zypper --no-abbrev search zypp Reading installed packages... S | Name | Summary | Type | Repository --+------------------------------+--------------------------------------------------------------------+------------+----------- i | libzypp | Package, Patch, Pattern, and Product Management | package | (multiple) | libzypp-devel | Package, Patch, Pattern, and Product Management - developers files | package | (multiple) | libzypp-testsuite-tools | Package, Patch, Pattern, and Product Management - testsuite-tools | package | (multiple) | libzypp-testsuite-tools-data | Package, Patch, Pattern, and Product Management - testsuite-data | package | (multiple) i | ruby-zypp | Ruby bindings for libzypp | package | (multiple) i | ruby-zypptools | Tools for ZYpp | package | factory i | zypper | Command line package management tool using libzypp | package | (multiple) | libzypp-bindings | Bindings for libzypp | srcpackage | (multiple) | libzypp-tools | Tools for ZYpp | srcpackage | factory $ zypper search -s zypp Reading installed packages... S | Repository | Type | Name | Version | Arch --+------------+------------+------------------------------+------------+------- i | @System | package | libzypp | 4.5.0-4 | x86_64 v | zypp:svn | package | libzypp | 4.13.1-1.1 | x86_64 v | factory | package | libzypp | 4.11.0-2 | x86_64 v | zypp:svn | package | libzypp | 4.13.1-1.1 | i586 v | factory | package | libzypp | 4.11.0-2 | i586 | zypp:svn | srcpackage | libzypp-bindings | 0.4.6-15.8 | noarch | zypp:svn | srcpackage | libzypp-bindings | 0.4.6-15.1 | noarch | factory | srcpackage | libzypp-bindings | 0.4.6-4 | noarch | zypp:svn | package | libzypp-devel | 4.13.1-1.1 | x86_64 | factory | package | libzypp-devel | 4.11.0-2 | x86_64 | zypp:svn | package | libzypp-devel | 4.13.1-1.1 | i586 | factory | package | libzypp-devel | 4.11.0-2 | i586 | zypp:svn | package | libzypp-testsuite-tools | 4.2.2-15.2 | x86_64 | factory | package | libzypp-testsuite-tools | 4.2.2-12 | x86_64 | zypp:svn | package | libzypp-testsuite-tools | 4.2.2-15.7 | i586 | factory | package | libzypp-testsuite-tools | 4.2.2-12 | i586 | zypp:svn | package | libzypp-testsuite-tools-data | 4.2.2-15.2 | x86_64 | factory | package | libzypp-testsuite-tools-data | 4.2.2-12 | x86_64 | zypp:svn | package | libzypp-testsuite-tools-data | 4.2.2-15.7 | i586 | factory | package | libzypp-testsuite-tools-data | 4.2.2-12 | i586 | factory | srcpackage | libzypp-tools | 0.2.0-2 | noarch i | @System | package | ruby-zypp | 0.4.6-2 | x86_64 v | zypp:svn | package | ruby-zypp | 0.4.6-15.1 | x86_64 v | factory | package | ruby-zypp | 0.4.6-4 | x86_64 v | zypp:svn | package | ruby-zypp | 0.4.6-15.8 | i586 v | factory | package | ruby-zypp | 0.4.6-4 | i586 i | @System | package | ruby-zypptools | 0.2.0-2 | x86_64 i | factory | package | ruby-zypptools | 0.2.0-2 | x86_64 v | factory | package | ruby-zypptools | 0.2.0-2 | i586 i | @System | package | zypper | 0.10.4-8 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | x86_64 v | factory | package | zypper | 0.10.6-2 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | i586 v | factory | package | zypper | 0.10.6-2 | i586
Hi, On Wed, 16 Apr 2008, Jan Kupec wrote:
Would anybody object if a do the following:
$ zypper search zypp
S | Name | Summary | Type | Repository --+--------+---------------------------------+---------+----------- i | zypper | Command line package managem... | package | (multiple)
Just drop the Repository column in this case, it doesn't provide any information if it just contains "multiple". I would leave out the Type column by default if all entries are only "package". I like the idea of abbreviated output (bonus points for taking the environment variable $COLUMNS into account ;-) ). One things that always bugged me in the zypper output are the long repository names, as by default they use their alias as name, which in turn by default is often the URL, and hence extremely long. One possible solution would be to show only made up repository numbers in the table itself, and then follow the table with an index of which repo is meant by which number: ala: ------------------------- S | R | Type | Name | Version | Arch --+---+---------+--------+------------+------- i | 1 | package | zypper | 0.10.4-8 | x86_64 v | 2 | package | zypper | 0.11.0-4.2 | x86_64 v | 3 | package | zypper | 0.10.6-2 | x86_64 v | 2 | package | zypper | 0.11.0-4.2 | i586 v | 3 | package | zypper | 0.10.6-2 | i586 Repos: 1 | @System 2 | zypp:svn 3 | factory ------------------------- That solution might be too nerdy, though (and only required when the repo names are "too long") :-/
$ zypper search --details zypper
S | Repository | Type | Name | Version | Arch --+------------+---------+--------+------------+------- i | @System | package | zypper | 0.10.4-8 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | x86_64 v | factory | package | zypper | 0.10.6-2 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | i586 v | factory | package | zypper | 0.10.6-2 | i586
I can move the Name column to the second position here, too.
It's probably not a good idea to have different column orders depending on --details or not. I've no better idea, though :-/ Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Just to make it clearer. The purpose is to show more important and simpler information than the current zypper search listing all solvables (all available versions/arch) which is quite detailed info. And the current search does not display summaries, which are quite interesting. Users currently need to do zypper info, to find out what is the package about. So to sum up the proposal in one sentence: display selectables with summaries by default, show the detailed solvable list with archs and version if --details is used. Michael Matz wrote:
Hi,
On Wed, 16 Apr 2008, Jan Kupec wrote:
Would anybody object if a do the following:
$ zypper search zypp
S | Name | Summary | Type | Repository --+--------+---------------------------------+---------+----------- i | zypper | Command line package managem... | package | (multiple)
Just drop the Repository column in this case, it doesn't provide any information if it just contains "multiple".
See the attachment, if the package is found only in one repo, the repo name is displayed. But speaking for myself, i'm not keen on showing the repo in the default view, the --details is enough for me.
I would leave out the Type column by default if all entries are only "package".
I agree :O)
I like the idea of abbreviated output (bonus points for taking the environment variable $COLUMNS into account ;-) ).
I'll try :O) (https://bugzilla.novell.com/show_bug.cgi?id=304282)
One things that always bugged me in the zypper output are the long repository names, as by default they use their alias as name, which in turn by default is often the URL, and hence extremely long.
Oh, the alias vs. name problem again :) It's a little bit different: the alias is always required, as it is the ID. YaST is the one which feeds URL there if it has no clue what else to give there. I hope we will solve this in YaST. Zypper users want to keep the alias short as they work with it. However, zypper displays the repo Name everywhere except the repo list of course. But the names are also often too long. I propose to show the alias in the tables (as soon as YaST stops using URI there), or an abbreviated name. See also this thread for the alias vs. name problem discussion: http://lists.opensuse.org/opensuse-softwaremgmt/2008-04/msg00004.html
One possible solution would be to show only made up repository numbers in the table itself, and then follow the table with an index of which repo is meant by which number: ala:
------------------------- S | R | Type | Name | Version | Arch --+---+---------+--------+------------+------- i | 1 | package | zypper | 0.10.4-8 | x86_64 v | 2 | package | zypper | 0.11.0-4.2 | x86_64 v | 3 | package | zypper | 0.10.6-2 | x86_64 v | 2 | package | zypper | 0.11.0-4.2 | i586 v | 3 | package | zypper | 0.10.6-2 | i586
Repos: 1 | @System 2 | zypp:svn 3 | factory -------------------------
That solution might be too nerdy, though
yup :O)
(and only required when the repo names are "too long") :-/
That's the point..
$ zypper search --details zypper
S | Repository | Type | Name | Version | Arch --+------------+---------+--------+------------+------- i | @System | package | zypper | 0.10.4-8 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | x86_64 v | factory | package | zypper | 0.10.6-2 | x86_64 v | zypp:svn | package | zypper | 0.11.0-4.2 | i586 v | factory | package | zypper | 0.10.6-2 | i586
I can move the Name column to the second position here, too.
It's probably not a good idea to have different column orders depending on --details or not. I've no better idea, though :-/
That's why i propose to move the Name column to the second position. And to swap Repository and Type of course :)) j. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Wed, 16 Apr 2008, Jan Kupec wrote:
So to sum up the proposal in one sentence: display selectables with summaries by default, show the detailed solvable list with archs and version if --details is used.
I agree with this proposal (just to leave no doubt here), and would even be more aggressive in removing uninteresting (to me :-) ) information.
$ zypper search zypp
S | Name | Summary | Type | Repository --+--------+---------------------------------+---------+----------- i | zypper | Command line package managem... | package | (multiple)
Just drop the Repository column in this case, it doesn't provide any information if it just contains "multiple".
See the attachment, if the package is found only in one repo, the repo name is displayed.
I see. I'm usually not particularly interested in the repo. Often it will be multiple repos, and then I would only see "multiple", not helping me at all. And if it's only one repo, I'm not interested in it either. After all, when I do "zypper in packagename" it will figure out the repo on it's own (it's only in one). And if it's multiple repos (so that it would have to ask me from which repo to install) the short output wouldn't help me. Get rid of that column I would say.
I like the idea of abbreviated output (bonus points for taking the environment variable $COLUMNS into account ;-) ).
I'll try :O) (https://bugzilla.novell.com/show_bug.cgi?id=304282)
$COLUMNS is not exported by default? How useless :-( Okay, easy way out: you already use readline in zypper, so you can use : -- Function: void rl_get_screen_size (int *rows, int *cols) Return Readline's idea of the terminal's size in the variables pointed to by the arguments. By that you don't need to fiddle with terminal escape sequences. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Michael Matz wrote:
Hi,
On Wed, 16 Apr 2008, Jan Kupec wrote:
Would anybody object if a do the following:
$ zypper search zypp
S | Name | Summary | Type | Repository --+--------+---------------------------------+---------+----------- i | zypper | Command line package managem... | package | (multiple)
Just drop the Repository column in this case, it doesn't provide any information if it just contains "multiple". I would leave out the Type column by default if all entries are only "package".
I like the idea of abbreviated output (bonus points for taking the environment variable $COLUMNS into account ;-) ).
Done, check out 0.11.2. Will i get the bonus points? :O) And thanx for the readline tip! :O) Cheers, jano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Wed, 30 Apr 2008, Jan Kupec wrote:
Just drop the Repository column in this case, it doesn't provide any information if it just contains "multiple". I would leave out the Type column by default if all entries are only "package".
I like the idea of abbreviated output (bonus points for taking the environment variable $COLUMNS into account ;-) ).
Done, check out 0.11.2. Will i get the bonus points? :O) And thanx for the readline tip! :O)
Cool. I'll be in Prague next week and can give you the bonus points then ;) Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Jan Kupec
-
Michael Matz