Try out equery list gtk+ or dvd+rw-tools. With gtk+ it will show all packages that start with gtk. For dvd+rw-tools it does not output anything.
It is due to the regular expression engine. This isn't intuitive, but the way to get the behavior that you are looking for is to prefix each + with \\ For example: equery list gtk\\+ equery list dvd\\+rw-tools
As this is a user utility, you can't expect they would escape it with a double-\\. So that should be really changed.
I agree with that. As much as I like regular expressions, I know that most users will be confused by them. Given that, my preference would be for equery to not use reqular expressions by default and have a flag that turns on the use of regular expressions.
*** Bug 78437 has been marked as a duplicate of this bug. ***
*** Bug 85361 has been marked as a duplicate of this bug. ***
I Just took a look at the the sources and found another problem: It seems that the a supplied release number is just ignored (optional in the regular expression): # equery.orig list gtk\\+-1.2.10-r10 [ Searching for package 'gtk\+' in all categories among: ] * installed packages [I--] [ ] x11-libs/gtk+-1.2.10-r11 (1) The supplied version is also used as regular expression. # equery.orig list gtk\\+-1..... [ Searching for package 'gtk\+-1.....' in all categories among: ] * installed packages [I--] [ ] x11-libs/gtk+-1.2.10-r11 (1) Yes: most users will be confused by this behavior. I suggest to escape the user query (look at my patch, but forgive me any bugs: i just came home tiddly). J
I Just took a look at the the sources and found another problem: It seems that the a supplied release number is just ignored (optional in the regular expression): # equery.orig list gtk\\+-1.2.10-r10 [ Searching for package 'gtk\+' in all categories among: ] * installed packages [I--] [ ] x11-libs/gtk+-1.2.10-r11 (1) The supplied version is also used as regular expression. # equery.orig list gtk\\+-1..... [ Searching for package 'gtk\+-1.....' in all categories among: ] * installed packages [I--] [ ] x11-libs/gtk+-1.2.10-r11 (1) Yes: most users will be confused by this behavior. I suggest to escape the user query (look at my patch, but forgive me any bugs: i just came home tiddly). Jürgen
Created attachment 53895 [details, diff] escape regex-characters and dont make release optional (if supplied)
Created attachment 53927 [details, diff] escape regex-characters and dont make release optional (if supplied)
above patch is much cleaner.
@tools-portage-herd: Any suggestions to the patches?
*** Bug 91438 has been marked as a duplicate of this bug. ***
Created attachment 58050 [details, diff] escapes regexps, in "equery belongs" too. Well, I got this done before I noticed duplicateness. Fixed a bit differently and also fixes similar regexp bug in "equery belongs" functionality.
*** Bug 97998 has been marked as a duplicate of this bug. ***
Created attachment 70384 [details, diff] Patch to escape regular expressions
Before I commit my changes to Subversion. I would like people to test the patch that I created against the equery in gentoolkit-0.2.1_pre8. The patch is based upon J
Before I commit my changes to Subversion. I would like people to test the patch that I created against the equery in gentoolkit-0.2.1_pre8. The patch is based upon Jürgen's original patch. If it looks good I will make similar changes to the equery belongs command and commit.
I found a couple minor issues with the patch: 1. 'equery w libsigc++' and 'equery s libsigc++' show [ Searching for packages matching libsigc++... ] while 'equery l libsigc++' shows: [ Searching for package 'libsigc\+\+' in '.*' among: ] It would be better to remove the \'s from the equery l output, it suggests the user can type a regular expression on the command line while he can't ('equery l libsig' doesn't show any results, while 'equery l libsigc++' does) 2. 'equery l' gives an error message while it should present a help message (like 'equery k')
Created attachment 70524 [details, diff] Patch to escape regular expressions Updated patch. 'equery list' is supposed to return a list of all installed packages. The original behavior of searching by regex is enabled by 'equery list -f <regex>' equery belongs will also now escape the query unless you use 'equery belongs -f <regex>'
Fix is in subversion
*** Bug 111155 has been marked as a duplicate of this bug. ***
Reopening, so that it shows up in searches that exclude resolved
Fix is in gentoolkit-0.2.1