[pkg-go] Bug#894862: Bug#894862: dh-golang: DH_GOPKG is empty in debian/rules, while documentation states that it's automatically set
Michael Stapelberg
stapelberg at debian.org
Thu Apr 5 20:56:46 UTC 2018
dpkg-buildpackage calls debian/rules (see
https://people.debian.org/~stapelberg//2016/11/25/build-tools.html), which
calls debhelper, including Debian::Debhelper::Buildsystem::golang(3pm),
which uses the DH_GOPKG variable (either from the environment, i.e. via
debian/rules, or from debian/control).
In other words: the value you specify in debian/control unfortunately
cannot be made available in debian/rules.
If you need to use DH_GOPKG in debian/rules, I recommend to define it both
in debian/control and in debian/rules as well.
This issue should be fixed with a documentation update. Could you supply a
patch please? You know best at which point the wording becomes clear enough
:). Thanks!
On Thu, Apr 5, 2018 at 4:55 AM, Arnaud Rebillout <
arnaud.rebillout at collabora.com> wrote:
> Package: dh-golang
> Version: 1.34
> Severity: normal
>
> Dear Maintainer,
>
> According to `man dh-golang`:
>
> "DH_GOPKG" (string) contains the Go package name which this Debian
> package is building.
>
> "DH_GOPKG" is automatically set to the value of the first import path
> of the "XS-Go-Import-Path" "debian/control" field, which can contain
> several comma-separated import paths.
>
> However, I tried to use this variable in the debian/rules file, in
> targets such as `override_dh_auto_test` and `override_dh_auto_build`,
> and this variable is empty.
>
> I added some debug to dh-golang, and I clearly see the code from
> `_set_dh_gopkg` being executed, and the variable is set there. So it
> looks like the environment in `debian/rules` is unrelated to the
> environment that is set by dh-golang.
>
> If it's expected, then maybe the man page needs a little rewording. If
> it's not expected, then it's a bug?
>
> Regards,
>
> Arnaud
>
> -- System Information:
> Debian Release: buster/sid
> APT prefers testing
> APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 4.13.0-1-amd64 (SMP w/8 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
> LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages dh-golang depends on:
> ii debhelper 11.1.5
> ii dpkg 1.19.0.5
> ii libdpkg-perl 1.19.0.5
> ii perl 5.26.1-5
>
> dh-golang recommends no packages.
>
> dh-golang suggests no packages.
>
> -- no debconf information
>
> _______________________________________________
> Pkg-go-maintainers mailing list
> Pkg-go-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers
>
--
Best regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20180405/c7a415ee/attachment.html>
More information about the Pkg-go-maintainers
mailing list