Bug#761219: debian-policy: document versioned Provides
On Fri, Mar 13, 2015 at 01:38:16PM -0400, David Prévot wrote:
> On Thu, Sep 11, 2014 at 09:57:57PM +0300, Niko Tyni wrote:
> > dpkg 1.17.11 and apt 1.0.7 recently implemented support for versioned
> > provides.
> > This clearly needs an update. No proposed wording yet, sorry.
> Here is a simple one, stripping away the incorrect restriction. The
> consideration about versioned virtual package may evolve with the dpkg
> implementation, so I don’t believe it is worth it to document it in the
> policy, at least not right now anyway.
Now that all the known glitches with practical support for versioned
Provides have been ironed out, and perl has been uploaded with versioned
provides, I believe it's time to address this policy question again.
I've attached an updated patch based on the discussion on this bug report,
noting that the discussion about backporting is now moot given the
time that has elapsed and that even jessie is barely a backporting
>From c55183e7fbc08018b71a413c2a533d470642f4d0 Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <email@example.com>
Date: Tue, 1 Jan 2019 18:36:54 +0000
Subject: [PATCH] Remove restrictions on versioned Provides
policy/ch-relationships.rst | 34 +++++++++++++---------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/policy/ch-relationships.rst b/policy/ch-relationships.rst
index 1d790e8..807face 100644
@@ -17,15 +17,16 @@ package names, separated by vertical bar (pipe) symbols ``|``. In such a
case, that part of the dependency can be satisfied by any one of the
alternative packages. [#]_
-All of the fields except for ``Provides`` may restrict their
-applicability to particular versions of each named package. This is done
-in parentheses after each individual package name; the parentheses
-should contain a relation from the list below followed by a version
-number, in the format described in :ref:`s-f-Version`.
+All of the fields may restrict their applicability to particular versions
+of each named package. This is done in parentheses after each individual
+package name; the parentheses should contain a relation from the list
+below followed by a version number, in the format described in
The relations allowed are ``<<``, ``<=``, ``=``, ``>=`` and ``>>`` for
strictly earlier, earlier or equal, exactly equal, later or equal and
-strictly later, respectively. [#]_
+strictly later, respectively. The exception is the Provides field, for
+which only ``=`` is allowed. [#]_
Whitespace may appear at any point in the version specification subject
to the rules in :ref:`s-controlsyntax`, and must appear
@@ -446,17 +447,10 @@ they can say:
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.
+A ``Provides`` field may contain version numbers, and the version number
+of the concrete package which provides a particular virtual package will
+be considered when considering a dependency on or conflict with the
+virtual package name. [#]_
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
@@ -670,10 +664,8 @@ dependencies.
together and then configured in their dependency order.
- 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.
+ This functionality was introduced in dpkg 1.17.11 and newer and
+ full support has been provided in the Debian archive since 2018.
To see why ``Breaks`` is normally needed in addition to ``Replaces``,