<div dir="ltr">Thinking about this some more, I think I now agree with the rationale.<div><br></div><div>When building packages, we must honor DH_GOLANG_EXCLUDES, so it doesn’t make sense to have the source files in the package.</div><div><br></div><div>The next step is making sure that we can safely do this change without breaking anything.</div><div><br></div><div>Clément, would you be interested in sending a patch and doing the test? If not, can I suggest you file a bug for this issue, and I’ll pick it up when time permits. Thanks!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 1, 2018 at 6:57 PM, Clément Hermann <span dir="ltr"><<a href="mailto:nodens@nodens.org" target="_blank">nodens@nodens.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 23/01/2018 13:43, Martín Ferrari wrote:<br>
> On 22/01/18 16:57, Michael Stapelberg wrote:<br>
><br>
>> We should exclude examples from being installed as binaries (which the<br>
>> example below does), but it’s not clear to me why we would exclude them<br>
>> from being included in the sources.<br>
><br>
> My rationale for that is that we ought to include them as examples (i.e.<br>
> in /usr/share/doc), and that many times, they do not build out of the<br>
> box, usually because of extra dependencies.<br>
<br>
>> The advantage to having them installed is that they could be compiled<br>
>> when testing packages for an updated package version, and thereby<br>
>> pinpointing an issue more quickly. E.g., assume I’m updating golang-foo<br>
>> 2.2 to 2.3, which is used by golang-bar, which in turn is used by<br>
>> cooltool. If golang-bar comes with an example program, I might catch the<br>
>> issue which golang-foo 2.3 introduces as a failure in the golang-bar<br>
>> compilation, not only in the cooltool compilation.<br>
><br>
> If they work, leaving them in the source and not excluding from<br>
> compilation/tests can be a good idea. And autopkgtest will pick them up<br>
> too. But I fear this will be a minority of cases.<br>
<br>
</span>I agree that it can be useful to have the example, even in the source,<br>
in this case.<br>
<br>
But I think Martín is right, that's probably a small amount of packages.<br>
<span class=""><br>
><br>
>>     > I thought I did. But indeed, I misread the man page [1], which plainly<br>
>>     > states that this is about excluding _targets_.<br>
><br>
>> By “this”, you refer to DH_GOLANG_EXCLUDES, I assume.<br>
> The main issue that we discussed with Clément is that DH_GOLANG_EXCLUDES<br>
> excludes packages from compilation, but not from installation. And I<br>
> feel that is not the best outcome.<br>
<br>
<br>
</span>Having a quick look using codesearch, I see that most package using<br>
DH_GOLANG_EXCLUDES leave them in the src tree afterward. A fair number<br>
of them apparently do what I did for golang-gopkg-lxc-go-lxc.v2, that is<br>
remove them from install afterward.<br>
<br>
An interesting counterexample is golang-github-prometheus-<wbr>common, where<br>
it is explicitely said that what is exclude is installed via dh_install<br>
but excluded from compilation to avoid circular dep:<br>
<br>
<a href="https://sources.debian.org/src/golang-github-prometheus-common/0+git20180110.89604d1-1/debian/rules/?hl=8#L8" rel="noreferrer" target="_blank">https://sources.debian.org/<wbr>src/golang-github-prometheus-<wbr>common/0+git20180110.89604d1-<wbr>1/debian/rules/?hl=8#L8</a><br>
<br>
<br>
I didn't go through all the packages, anyway as I suggested in the first<br>
mail it would be necessary to go through different stages to change<br>
this. Or we could simply add another var that would do both (but if we<br>
go that route, I still think the name is misleading because too generic,<br>
DH_GOLANG_BUILD_EXCLUDES or something like that would be clearer IMO).<br>
<br>
Cheers,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
nodens<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Pkg-go-maintainers mailing list<br>
<a href="mailto:Pkg-go-maintainers@lists.alioth.debian.org">Pkg-go-maintainers@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-go-maintainers</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>