Add infra to inject arbitrary dependencies, in particular plasma-base dependencies
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_injectdependencieswhich can add arbitrary dependencies likedh_injectdependencies breaks: "plasma-base (>= 5.22)" depends: "plasma-base (>= 5.21)"
- add a DebHelper sequence injectdependenciesso that one can use it with--with
- add a plasma.mkmakefile 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 injectdependenciesto the--withlist
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.