Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97873 - app-portage/gentoolkit-0.2.1_pre4 - equery does not support wildcards correctly?
Summary: app-portage/gentoolkit-0.2.1_pre4 - equery does not support wildcards correctly?
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-04 01:16 UTC by Alon Bar-Lev (RETIRED)
Modified: 2005-07-04 03:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-04 01:22:07 UTC
qpkg handled it OK (If I remember correctly)
It seems that the equery looks for a complete word between dashes...

------------------------------------------------------------
# equery list 'gentoo*'
[ Searching for package 'gentoo*' in all categories among: ]
 * installed packages
[I--] [  ] app-vim/gentoo-syntax-20050325 (0)
[I--] [  ] net-www/gentoo-webroot-default-0.2 (0)
[I--] [  ] sys-kernel/gentoo-sources-2.6.12-r3 (2.6.12-r3)

# equery list '*' | grep /gentoo
app-portage/gentoolkit-0.2.1_pre4
app-vim/gentoo-syntax-20050325
net-www/gentoo-webroot-default-0.2
sys-kernel/gentoo-sources-2.6.12-r3
sys-kernel/gentoo_suspend2_test-sources-2.6.12-r3
sys-kernel/gentoo_suspend2-sources-2.6.12-r3
------------------------------------------------------------


Reproducible: Always
Steps to Reproduce:
1. equery list 'gentoo*'
2. equery list '*' | grep /gentoo
3. compare results
Actual Results:  
Allow equery to receive wildcards at package name

Expected Results:  
Show all packages matching the wildcard
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2005-07-04 01:56:42 UTC
There are two different things to note here.

Firstly, equery list treats its arguments as a regexp, so gentoo* means "gento"
followed by any amount of o's. To get what you want, you'd search for
"gentoo.*". The reason "*" without anything else does work - assuming I recall
correctly - is because this is treated as a special case.

Secondly, equery doesn't look for versions properly. When you search for
"gentoo*",  it looks for packages of which the name matches gentoo*, with any
version number. However, it doesn't actually search for .*/gentoo*-<version
number>, it simply searches for .*/gentoo*-.* without paying attention to what
that which follows - actually is.

I believe I've seen that second part reported before, but I can't seem to find
it now.
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-04 02:17:34 UTC
Thanks!
I would have never guessed that it uses regexp and not wildcards...
Please consider adding a note in the usage... "pkgspec is regexp"

Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2005-07-04 02:48:32 UTC
According to bug #77113 the idea is that regexes won't be used (or not by
default, at least) in some future version. That'd work too, no? :)
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-04 03:51:25 UTC
Hmmm... RegExp was super!!!
I hope it will be supported... :)
If not... I can always use the grep approach... :)