#980058 mk-build-deps: provide a way to generate B-Ds for arch-independent builds

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
IOhannes m zmoelnig
Date:
2021-01-13 15:57:04 UTC
Severity:
wishlist
#980058#5
Date:
2021-01-13 15:51:56 UTC
From:
To:
Dear Maintainer,

as mentioned in the policy [1], d/control can have a Build-Depends-Indep field
to specify (additional) dependencies for building the arch:all packages of a
source package.

'mk-build-deps' has a '--build-indep' flag, that seems to be targetted at this
use-case (building only arch:all) packages, but in it's current form I think it
is of little use.
as the mk-build-deps(1) mentions, the '--build-indep' flag generates a
- for building "arch:any", install 'Build-Depends' + 'Build-Depends-Arch'
- for building "arch:all", install 'Build-Depends' + 'Build-Depends-Indep'
- for building all packages, install 'Build-Depends' + 'Build-Depends-Arch' + 'Build-Depends-Indep'

now, depending on it's invocation 'mk-build-deps' will create a dependency
package for a subset of the Build-Depends:
- 'mk-build-deps': depends on 'Build-Depends' + 'Build-Depends-Arch' + 'Build-Depends-Indep'
- 'mk-build-deps --build-dep': depends on 'Build-Depends' + 'Build-Depends-Arch'
- 'mk-build-deps --build-indep': depends on 'Build-Depends-Indep'

as you can see, the invocation of 'mk-build-deps' (without flags) matches the
target of building all packages (both arch:any and arch:all).
the invocation of 'mk-build-deps --build-dep' matches the target of building
only arch:any packages.
however, the invocation of 'mk-build-deps --build-indep' does NOT match the
target of building only arch:all packages (as the 'Build-Depends' is missing)

i'm not sure whether this is actually a bugin 'mk-build-deps', but since it is
documented in the mangpage, it probably is not.
however, I don't see any use in installing Build-Depends-Indep only, so I don't
know what the '--build-indep' flag is intended for.

if it is not a bug (and there *is* a use-case for the flag as is), I would
suggest to add a new flag to create a dependency package targetted at building
arch:all binary packages.

in the end, i would like to have the salsa-ci pipeline "test-build-all" behave
more like the buildds, and make it only install the packages required to build
the arch:all portions (and leave out Build-Depends-Arch). since the
"test-build-all" pipeline currently depends on 'mk-build-deps' i need your
co-operation ;-)

thanks for considering.

PS: i haven't checked the situtation of Build-Conflicts-*, but it should behave
accordingly.


[1] https://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps