Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315665 - app-portage/gentoolkit-0.3.0.4: equery list 'something-*' is broken
Summary: app-portage/gentoolkit-0.3.0.4: equery list 'something-*' is broken
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 346443
  Show dependency tree
 
Reported: 2010-04-16 20:43 UTC by Paul Varner (RETIRED)
Modified: 2020-08-02 01:11 UTC (History)
2 users (show)

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 Paul Varner (RETIRED) gentoo-dev 2010-04-16 20:43:34 UTC
Not sure when we broke this, but at least as of rc10 and current svn it doesn't work.

$ equery --version
equery (0.3.0_rc10-r1) - Gentoo package query tool
$ equery list 'app-portage/*'
 * Searching for * in app-portage ...
!!! No installed packages matching 'app-portage/*'
$ equery list '*' | grep app-portage
app-portage/eix-0.20.3
app-portage/esearch-0.7.1-r7
app-portage/g-cpan-0.16.2
app-portage/genlop-0.30.8-r2
app-portage/gentoolkit-0.3.0_rc10-r1
app-portage/gentoolkit-dev-0.2.6.14
app-portage/kernelmod-rebuild-0.2.3
app-portage/layman-1.3.3
app-portage/portage-utils-0.3.1
app-portage/porthole-0.6.1-r1
app-portage/portpeek-2.0.0
app-portage/udept-0.5.99.0.2.95-r1
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2010-04-16 22:19:02 UTC
It might have been the new cpv class that Douglas did.
Comment 2 Andy Kittner 2010-04-17 09:49:07 UTC
(In reply to comment #1)
> It might have been the new cpv class that Douglas did.
> 

I had a quick look, seems this fix in python 2.6.5 is the cause:
- Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
(Which also seems to be in python-3.1.2):
We try to replace a "$" at the end of the regexp created by fnmatch that isn't there any more:
In [4]: fnmatch.translate("app-portage")
Out[4]: 'app\\-portage\\Z(?ms)'

I have to go now, but unless someone beats me to it I can look into a proper fix for this this evening
Comment 3 Andy Kittner 2010-04-17 21:37:15 UTC
Fix for this is in genscripts-svn r428

Also while looking at the code I noticed that the globbing behaves slightly inconsistent. Without a category we match against $CATEGORY/$PN only, with a category the glob is performed against the complete CPV:

andkit@archvile gentoolkit % bin/equery l 'gentoolkit-*'
 * Searching for gentoolkit* ...
[IP-] [  ] app-portage/gentoolkit-dev-9999:0

andkit@archvile gentoolkit % bin/equery l 'app-portage/gentoolkit-*'
 * Searching for gentoolkit* in app-portage ...
[I-O] [  ] app-portage/gentoolkit-9999:0
[IP-] [  ] app-portage/gentoolkit-dev-9999:0

Should we try to unify those two behaviors, if so which variant would be better? (Personally I'd say yes and go with the first as it seems more 'natural', but the latter may be more flexible)
Comment 4 Douglas Anderson 2010-07-16 07:17:31 UTC
(In reply to comment #3)

Sure, let's go with the first behavior, as it does make more sense, and IIRC the latter behavior is difficult to code without slowing down lookups considerably.
Comment 5 Douglas Anderson 2010-07-16 12:04:30 UTC
Fixed in genscripts repo.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2010-11-22 21:03:06 UTC
Original issue fixed, but one of the test cases in this bug is now broken:

# equery list 'gentoolkit-*'
!!! Invalid CPV: 'gentoolkit-*'
Comment 7 Paul Varner (RETIRED) gentoo-dev 2011-05-11 00:33:23 UTC
This edge case is still broken.  Changing targeted release to 0.3.1
Comment 8 Zoltan Puskas 2020-08-02 01:11:17 UTC
Test on app-portage/gentoolkit-0.5.0:

>>> equery list 'app-portage/*'
 * Searching for * in app-portage ...
[IP-] [  ] app-portage/eix-0.34.4:0
[IP-] [  ] app-portage/elt-patches-20170826.1:0
[IP-] [  ] app-portage/flaggie-0.2.1-r1:0
[IP-] [  ] app-portage/g-octave-0.4.1-r7:0
[IP-] [  ] app-portage/gemato-14.4:0
[IP-] [  ] app-portage/genlop-0.30.10-r2:0
[IP-] [  ] app-portage/gentoolkit-0.5.0:0
[IP-] [  ] app-portage/layman-2.4.3:0
[IP-] [  ] app-portage/portage-utils-0.88:0
[IP-] [  ] app-portage/repoman-2.3.23:0

Sometime in the past 10 years this has been fixed. :)