Re: Understanding aptitude search patterns
- From: Panayiotis Karabassis <panayk@xxxxxxxxx>
- Date: Tue, 04 Oct 2011 15:16:04 +0300
I still have much to learn about aptitude, but in case anyone is
interested, I made some sense from the source code, which seem to be
ingenious at times:
There are indeed two modes, but not what I thought. There is a "match
all versions" mode, which seems to be used by ?all-versions() and a
"match any version" which seems to be used by everything else. What the
latter returns (all versions or just the versions that matched), I do
not know.
The really clever part is how ?any-version() works. Matches happen
against a pool of package versions. So ?any-version creates a *new pool*
for each package version in the original pool. Then it concatenates the
matches together. That way it forces a package search to become a
version search. Think about it. Amazing. I am a better programmer for
finding this gem.
The documentation could be more detailed though.
--
Best regards,
Panayiotis Karabassis
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4E8AF904.4050002@xxxxxxxxx
- Follow-Ups:
- Re: Understanding aptitude search patterns
- From: Javier Barroso
- Re: Understanding aptitude search patterns
- References:
- Understanding aptitude search patterns
- From: Panayiotis Karabassis
- Re: Understanding aptitude search patterns
- From: Panayiotis Karabassis
- Understanding aptitude search patterns
- Prev by Date: Re: Re: [OT] British vs. American English
- Next by Date: debug apache-php dump
- Previous by thread: Re: Understanding aptitude search patterns
- Next by thread: Re: Understanding aptitude search patterns
- Index(es):
Relevant Pages
|