Andrew Lee <[email protected]> writes:

> Hi team,
>
> I have ported `amfora` to modern, module-aware builds in experimental.
>
> While porting that, I found dh-golang coundn't properly map some
> dependencies correctly. I think this might come from some -dev
> packages without proper dependencies that not sync'ed with all the
> requires modules in it's go.mod file.
>
> So I use the DH_GOLANG_MODULE_MAPPINGS variable in debian/rules for a
> workaround on such edge case. This variable allows us to manually
> append mapping to Go module import path to its actull directory
> installed on the filesystem during module-aware builds.
>
> You can see these as an example:
>   https://salsa.debian.org/go-team/packages/amfora/-/blob/master/debian/rules

Yay, thanks!  Could you expand further (maybe a wiki page?) with what
the error messages that lead you to add those mappings?  I.e., how to
discover when these mappings are useful.

Adding links to the documention would also be good:

https://manpages.debian.org/experimental/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html#DH_GOLANG_MODULE_MAPPINGS

Is there a preference where to fix these issues?

It could be fixed with DH_GOLANG_MODULE_MAPPINGS in every consumer of a
golang-*-dev package, but couldn't it also be fixed in the golang-*-dev
package once?  The latter seems to scale better, doesn't it?

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to