[Aptitude-devel] Search term for existence

Martin Stjernholm apt at stjernholm.org
Tue Feb 3 23:12:20 UTC 2009


Hello!

The search patterns in aptitude are very powerful, but there is one
thing I fail to express:

I want to match a package according to condition A, provided there
exists some other package that match condition B. (To be useful, the
two conditions A and B would incorporate a common variable.)

I'm not quite sure that isn't possible to accomplish using ?for and
?bind, but if so I can't get my head around how to do it.

So what I'm asking for is a search term like this:

?exists(pattern)         Selects anything if there exists a
                         package that matches <pattern>.

In other words, this would be the common existence quantifier in
predicate logic.

If it's implemented, then maybe its dualistic counterpart, the
universal quantifier, could be considered too for completeness:

?universal(pattern)      Selects anything if all packages match
                         <pattern>.

(It'd just be an alias for !?exists(!pattern).)

Thank you.



More information about the Aptitude-devel mailing list