Debian Packaging – Why ‘Provides’ Does Not Satisfy Dependency

debianpackaging

Usecase

The package gnome-core depends on gnome-shell-extensions >=3.14. I'd like to remove gnome-shell-extensions but to satisfy the dependency, I have to replace it with a dummy package. I'm using equivs for this to create a replacement dummy package for gnome-shell-extensions.

My equivs control file is as follows:

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: gnome-shell-extensions
Version: 1.0
Maintainer: Me Myself <me@myself.org>
Provides: gnome-shell-extensions
Architecture: all
Description: gnome-shell-extensions dummy package to satisfy gnome dependencies

Issue

The package built obviously provides gnome-shell-extensions, but even after installing it, apt still complains that gnome-core : depends on: gnome-shell-extensions (>= 3.14)

I understand that the Version field in the control file has nothing to do with it, as it only marks the version of the dummy package.

Workaround

I have successfully managed to fake the original package by using the original package name, i.e. Package: gnome-shell-extensions, but I'd rather keep the dummy package name.

Question

What do I have to do to satisfy the dependency gnome-shell-extensions >=3.14 while using another package that Provides: gnome-shell-extensions?

Best Answer

You should now be able to use versioned Provides::

Provides: gnome-shell-extensions (= 3.14.2-1)

This is supported since dpkg 1.17.11, so since Debian 8 (Jessie). Debian Policy hasn’t been updated to take this possibility into account yet, so it still claims two things which are no longer correct:

  • Provides: can’t have a version constraint;
  • relationships with version constraints ignore virtual packages.

Bug #761219 tracks the documentation updates.

Related Question