Technical data

8. Documentation for Developers
Definition of a Service with an associated Version Number: provides
For instance, an OPT may declare that it provides a Printer service or a Webserver service.
Only one package can provide a certain service. This prevents i.e. that two web servers are
installed in parallel, which is not possible for obvious reasons, since the two servers would both
register port 80. In addition, the current version of the service is provided so that updates can
be triggered. The version number consists of two or three numbers separated by dots, such as
“4.0” or “2.1.23”.
Services typically originate from OPTs, not from packages. For example the package “tools”
has a number of programs that each have their own provides statement defined if activated
by OPT_...='yes'.
The syntax is as follows:
provides <Name> version <Version>
Example from package “easycron”:
provides cron version 3.10.0
The version number should be incemented by the OPT-developer in the third component,
if only functional enhancements have been made and the OPT’s interface is still. The version
number should be increased in the first or second component when the interface has changed
in any incompatible way (eg. due to variable renaming, path changes, missing or renamed
utilities, etc.).
Definition of a Dependency to a Service with a specific Version: depends
If another service is needed to provide the own function (eg. a web server) this dependency
to a specific version may be defined here. The version can be given with two (i.e. “2.1”) or
three numbers (i.e. “2.1.11”) while the two-number version accepts all versions starting with
this number and the three-number version only accepting just the specified one. A list of
version numbers may also be specified if multiple versions of the service are compatible with
the package.
The syntax is as follows:
depends on <Name> version <Version>+
An example: Package “server” contains:
provides server version 1.0.1
A Package “client” with the following depends-instruction is given:
2
depends on server version 1.0 # OK, '1.0' matches '1.0.1'
depends on server version 1.0.1 # OK, '1.0.1' matches '1.0.1'
depends on server version 1.0.2 # Error, '1.0.2' does not match with '1.0.1'
depends on server version 1.1 # Error, '1.1' does not match with '1.0.1'
depends on server version 1.0 1.1 # OK, '1.0' matches '1.0.1'
depends on server version 1.0.2 1.1 # Error, neither '1.0.2' nor '1.1' are matching
# '1.0.1'
2
Of course only one at a time!
302