From Fedora Project Wiki

Automatic strict inter-package dependencies


Implement feature in RPM which will enforce strict dependencies between subpackages automatically (right now packagers have to do it themselves).


  • Name: Igor Gnatenko
  • Email:
  • Release notes owner:

Current status

Detailed Description

If there's no requires that matches with a provides in another subpackage that's built from the spec, rpm would not do anything, and it'll be exactly as it is now. This is merely about optimizing requires across subpackages from the same source package.

Abstract example

For example, foo, foo-libs, libfoobaz, and foo-devel exist, built from foo.spec.

foo-devel requires (provided by libfoobaz) and (provided by foo-libs).

Currently, rpm generates the and dependencies and leaves the rest to you. This will change the behavior so that when it identifies that a subpackage produced from the spec contains that dependency, it'll be replaced with a strictly versioned dep on the subpackage. So instead of, it'll be foo-libs%{?_isa} = %{version}-%{release}. And the dependency would be replaced with libfoobaz%{?_isa} = %{version}-%{release}.

Concrete example (graphene)

Spec file contains:

%package devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%package tests
Requires: %{name}%{?_isa} = %{version}-%{release}

What we see when we build RPMs is:

  • graphene-devel requires graphene(x86-64) = 1.8.2-3.fc30 AND AND pkgconfig(graphene-1.0)
  • graphene-tests requires graphene(x86-64) = 1.8.2-3.fc30 AND

What can we do?

  • Requires: is actually provided by graphene (coming from same package), so it can be dropped in favor of Requires: graphene(x86-64) = 1.8.2-3.fc30
  • Requires: pkgconfig(graphene-1.0) is provided by graphene-devel (coming from the same subpackage), so it can be dropped entirely

Benefit to Fedora

Package dependencies (between subpackages) will be more strict, more automated (this section from guidelines can be dropped entirely). Metadata size will decrease as well.


  • Proposal owners: Implement required feature in RPM, backport it to Fedora.
  • Other developers: Drop unneeded dependencies to keep spec file simpler.
  • Release engineering: #8128
  • Policies and guidelines: Drop yet another Packaging Guidelines section because it will be automated.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

Everything will keep working.

How To Test


User Experience

User's won't see packaging errors (wrt. inter-package dependencies) anymore.


RPM changes are needed. Will be handled by Proposal Owners.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Proposal Owners will try to fix problems ASAP or move Change to the next release (and revert changes).
  • Contingency deadline: Beta Freeze.
  • Blocks release? No.
  • Blocks product? No.



Release Notes