Your message dated Tue, 28 Aug 2018 15:04:55 +0000
with message-id <e1fufy7-000cec...@fasolo.debian.org>
and subject line Bug#907263: fixed in dh-golang 1.35
has caused the Debian Bug report #907263,
regarding dh-golang: Failed to build with gccgo-8
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
907263: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907263
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dh-golang
Severity: important
Tags: patch

Dear Maintainer,

dh-golang failed to build with gccgo-8.

   dh_golang -O--buildsystem=golang
        "go list -f '{{ range .Deps }}{{.}}\
{{ end }}'" github.com/elves/elvish [...]
        "go list -f '\\\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles 
.IgnoredGoFiles) 0 }}'" bufio bytes [...]
template: main:2:14: executing "main" at <index (or .GoFiles ....>: error 
calling index: index out of range: 0
dh_golang: go list -f '\
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles 
.IgnoredGoFiles) 0 }}' returned exit code 1
make: *** [debian/rules:18: binary] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit 
status 2

The reason is that since gccgo-8, `go list {{ .Deps }}` will return
standard library. But it can't return the source files for standard
library. So the template will execute things like `index [] 0`.

Patch is attached.

-- 
Best regards,
Shengjing Zhu
>From 18c297db3557315a9ab844d1f6c4bdaceabbe987 Mon Sep 17 00:00:00 2001
From: Shengjing Zhu <i...@zhsj.me>
Date: Sat, 25 Aug 2018 23:57:58 +0800
Subject: [PATCH] Fix index out of range when list godeps sources

Signed-off-by: Shengjing Zhu <i...@zhsj.me>
---
 script/dh_golang | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/dh_golang b/script/dh_golang
index 73ded48..4dc66ab 100755
--- a/script/dh_golang
+++ b/script/dh_golang
@@ -77,7 +77,7 @@ my $tmpl = '{{ range .Deps }}{{.}}
 my @godeps = exec_single(qq{go list -f '$tmpl'}, @targets);
 
 my $gofiletmpl = '\
-{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}';
+{{ if $x := (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) }}{{ .Dir }}/{{ index $x 0 }}{{ end }}';
 my @gofiles = exec_chunked(qq{go list -f '$gofiletmpl'}, uniq(@godeps));
 
 my @realpath;
-- 
2.18.0


--- End Message ---
--- Begin Message ---
Source: dh-golang
Source-Version: 1.35

We believe that the bug you reported is fixed in the latest version of
dh-golang, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 907...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Shengjing Zhu <i...@zhsj.me> (supplier of updated dh-golang package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 28 Aug 2018 22:03:23 +0800
Source: dh-golang
Binary: dh-golang
Architecture: source
Version: 1.35
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <team+pkg...@tracker.debian.org>
Changed-By: Shengjing Zhu <i...@zhsj.me>
Description:
 dh-golang  - debhelper add-on for packaging software written in Go (golang)
Closes: 907263
Changes:
 dh-golang (1.35) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 .
   [ Arnaud Rebillout ]
   * Mention that DH_GOPKG is not set in debian/rules.
 .
   [ Shengjing Zhu ]
   * Update Standards-Version to 4.2.1. (no changes)
   * Update team mail address to tracker.debian.org.
   * Fix index out of range when using gccgo. (Closes: #907263)
Checksums-Sha1:
 c059793e7d54c547bc788ec4ec12bf748b3f2880 1333 dh-golang_1.35.dsc
 53ab6a0f062eb084f0410ecccac8b787b71be7e6 12492 dh-golang_1.35.tar.xz
 7956e956d4dfded8a93f8142f53c34dd55f50649 5339 dh-golang_1.35_amd64.buildinfo
Checksums-Sha256:
 755332fd4afe019f3a17c95530f85f2c1500aa3f046692f4a2e941088a9e4b05 1333 
dh-golang_1.35.dsc
 754b3f60a09b111569ad551d02ec3b347a219e81c1516b288fb8e6fa6c4939a1 12492 
dh-golang_1.35.tar.xz
 a53edbaddad1ed7455704ce4fe4d9c95c45f5b90e8ef758409a433dc028640dc 5339 
dh-golang_1.35_amd64.buildinfo
Files:
 9c3c3c4d04f4bf37d4def02339eb28d8 1333 devel optional dh-golang_1.35.dsc
 1279d6ee414f198b0a745eb1b99f0fd0 12492 devel optional dh-golang_1.35.tar.xz
 0f549416f1af68410cf49004ec39452f 5339 devel optional 
dh-golang_1.35_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQE+BAEBCgAoFiEE85F2DZP0aJKsSKyHONAPABi+PjUFAluFXk8KHGlAemhzai5t
ZQAKCRA40A8AGL4+Na2LB/456jTFWKcnc1/xORrjGLT4SCzkzPGGm/0e1wTl2zzI
auIVyooAUGCVk0dcDFEb8PW6DzdxYUNw6W95zmOt/6oXYg8UV32Eg8BVP7gGtEIO
l+O8kmIv+r3OD2qGIVF/xr4TiotlBoS+f4/WzlytB2BJMqdpDn7NcJjCp636DumT
m1IFrIxHDEoIiaPv1j6otP0IKHVPdLnjL2Lnj1w4CH0guaYEdtQ4pS8IP0jijOzc
4km3viDRUWYpHsw7UhweqpCLTZXY4Q1ukw06FyS2ITJXjS5SNDcjd8HRZRO02THL
elFkrFKhMEW7+k2B+VskQobAa3w5Er8XwlPmozb3wXxK
=GsC5
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Pkg-go-maintainers mailing list
Pkg-go-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers

Reply via email to