(debian-policy.info)Virtual packages - Provides


Next: Overwriting files and replacing packages - Replaces Prev: Conflicting binary packages - Conflicts Up: Declaring relationships between packages
Enter node , (file) or (file)node

7.5 Virtual packages - ‘Provides’
=================================

As well as the names of actual (“concrete”) packages, the package
relationship fields ‘Depends’, ‘Recommends’, ‘Suggests’, ‘Enhances’,
‘Pre-Depends’, ‘Breaks’, ‘Conflicts’, ‘Build-Depends’,
‘Build-Depends-Indep’, ‘Build-Depends-Arch’, ‘Build-Conflicts’,
‘Build-Conflicts-Indep’ and ‘Build-Conflicts-Arch’ may mention “virtual
packages”.

A `virtual package' is one which appears in the ‘Provides’ control field
of another package.  The effect is as if the package(s) which provide a
particular virtual package name had been listed by name everywhere the
virtual package name appears.  (See also Note: Virtual packages.)

If there are both concrete and virtual packages of the same name, then
the dependency may be satisfied (or the conflict caused) by either the
concrete package with the name in question or any other concrete package
which provides the virtual package with the name in question.  This is
so that, for example, supposing we have

     Package: foo
     Depends: bar

and someone else releases an enhanced version of the ‘bar’ package they
can say:

     Package: bar-plus
     Provides: bar

and the ‘bar-plus’ package will now also satisfy the dependency for the
‘foo’ package.

If a relationship field has a version number attached, only real
packages will be considered to see whether the relationship is satisfied
(or the prohibition violated, for a conflict or breakage).  In other
words, if a version number is specified, this is a request to ignore all
‘Provides’ for that package name and consider only real packages.  The
package manager will assume that a package providing that virtual
package is not of the “right” version.  A ‘Provides’ field may not
contain version numbers, and the version number of the concrete package
which provides a particular virtual package will not be considered when
considering a dependency on or conflict with the virtual package name.
(1)

To specify which of a set of real packages should be the default to
satisfy a particular dependency on a virtual package, list the real
package as an alternative before the virtual one.

If the virtual package represents a facility that can only be provided
by one real package at a time, such as the mail-transport-agent virtual
package that requires installation of a binary that would conflict with
all other providers of that virtual package (see Note: Mail transport,
delivery and user agents.), all packages providing that virtual
package should also declare a conflict with it using ‘Conflicts’.  This
will ensure that at most one provider of that virtual package is
unpacked or installed at a time.

   ---------- Footnotes ----------

   (1) It is possible that a future release of ‘dpkg’ may add the
ability to specify a version number for each virtual package it
provides.  This feature is not yet present, however, and is expected to
be used only infrequently.


automatically generated by info2www version 1.2.2.9