[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Understanding aptitude search patterns



On Tue, Oct 4, 2011 at 2:16 PM, Panayiotis Karabassis <panayk@gmail.com> wrote:
> 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.
I propose you sending a patch with that detailed documentation to
aptitude-devel@lists.alioth.debian.org (or like a wishlist in PTS)

Regards,


Reply to: