Chapter 5. Complex packages

Table of Contents
The standard predicates
Defining additional predicates
Appending to variables
Glue code

The standard predicates

Settings in the META file have usually the form:

varname ( predname1, predname2, ... ) = "value"

The names in the parantheses are called formal predicates and express a condition which must hold such that the value on the right side is selected. When querying information you can specify a set of actual predicates that are assumed to be true. There are the following standard predicates:

It is possible to have more predicates indicating different environments; just use them, it is not necessary to declare them anywhere.

The value which is selected for a variable depends on the set of assumed predicates. In order to get selected, all formal predicates must be included in the set of actual predicates; if still multiple values fulfill this condition, the value with the maximum number of formal predicates is used; and if still in doubt, the first of these in the META file is taken.

It is possible to negate a formal predicate: Just prepend a minus sign to it, e.g. var(p,-q). In this case, it is required that the negated predicates are false (not contained in the set of actual predicates).

For all variables that are evaluated after the dependency analysis, findlib adds the so-called package predicates to the set of actual predicates. For every selected package p the predicate pkg_p (with the fixed prefix "pkg_") is added. One application of this are compatibility checks: The special error variable is evaluated after dependency analysis, but before anything else is done. For example, to state that package p is incompatible with package q one can add to the META file of p:

error(pkg_q) = "Package p is incompatible with q"
The value of error is printed as message in the case the condition is true.