Skip to content

Add infra to inject arbitrary dependencies, in particular plasma-base dependencies

He who must not be named requested to merge dh-plasma into master

Aim of this MR is to allow for auto-injection of plasma-base dependencies (as discussed on IRC and mailing list) by doing the following:

  • add a new script dh_injectdependencies which can add arbitrary dependencies like dh_injectdependencies breaks: "plasma-base (>= 5.22)" depends: "plasma-base (>= 5.21)"
  • add a DebHelper sequence injectdependencies so that one can use it with --with
  • add a plasma.mk makefile snippet that auto-computes the correct versions and inject them.

As an example, I changed one Plasma package debian/rules file to:

  • add
include /usr/share/pkg-kde-tools/qt-kde-team/1/plasma.mk
  • add injectdependencies to the --with list

In total it starts as:

include /usr/share/pkg-kde-tools/qt-kde-team/1/plasma.mk

%:
        dh $@ --with kf5,pkgkde_symbolshelper,injectdependencies --buildsystem kf5 --without build_stamp
  • add Breaks: ${misc:Breaks} to each binary package stanza

With that, each binary package gets (for version 5.20.3) additional

Depends: plasma-base (>= 5.20)
Breaks: plasma-base (>= 5.21)

The above changes have to be done only once, and new versions will automatically pick up the correct major.minor dep/break.

Questions

I had contemplated putting the code of the injectsequences into the kf5 sequence (Debhelper), it only adds a call to dh_injectsequences before dh_gencontrol, and without an override it does nothing. By that, no addition to the --with code is necessary. What do other think about this approach?

Another thing to ponder is renaming the script to dh_injectrels or dh_injectrelations.

Merge request reports

Loading