Requirements of kinds 1. and 2. are resolved between project versions in the distribution under consideration to produce concrete (ordering) dependencies. Requirements of kind 3. are used to compute a list of required system packages for a given target platform.
Requirements of kinds 1. and 2. cannot be resolved using system packages. Imagine the automatic analysis somehow yields the required feature pkg-config:libsomething:1.2.3. Even if there is a platform-requires entry for say the libsomething-dev package, the required feature will still be considered unsatisfied.
A requirement can be satisfied by system packages in different ways. For example, depending on a fictional "Library for something" in a C++ program could correspond to the following requirements on the system package level:
This is not a problem when specified in a single recipe, but imagine multiple projects depending on this library. Each library would have to include this fragment. Obviously not good.
Describe the solution you'd like
Introduce a new platform-provides variable that can be used to describe the provided features of system packages. The syntax is as follows:
Is your feature request related to a problem? Please describe.
Project versions currently have three ways of requiring things:
The generator's automatic analysis yields required feature triples
nature:name[:version]
The recipe (or a template) can contain
extra-requires
definitions also specifying feature triplesThe recipe (or a template) can contain
platform-requires
definitions specifying lists of systems packages in a ancestry-based tree of platforms:Requirements of kinds 1. and 2. are resolved between project versions in the distribution under consideration to produce concrete (ordering) dependencies. Requirements of kind 3. are used to compute a list of required system packages for a given target platform.
See this presentation for more details.
There are two problems with this approach:
Requirements of kinds 1. and 2. cannot be resolved using system packages. Imagine the automatic analysis somehow yields the required feature
pkg-config:libsomething:1.2.3
. Even if there is aplatform-requires
entry for say thelibsomething-dev
package, the required feature will still be considered unsatisfied.A requirement can be satisfied by system packages in different ways. For example, depending on a fictional "Library for something" in a C++ program could correspond to the following requirements on the system package level:
This is not a problem when specified in a single recipe, but imagine multiple projects depending on this library. Each library would have to include this fragment. Obviously not good.
Describe the solution you'd like
Introduce a new
platform-provides
variable that can be used to describe the provided features of system packages. The syntax is as follows:A list of these descriptions would be collected and maintained in a template (solving problem 2.). A recipe currently containing
could then be simplified to
or even nothing if the feature requirement can be identified by the automatic analysis (solving problem 1.).