Your message dated Fri, 06 Nov 2026 18:19:03 +0000
with message-id <[email protected]>
and subject line Bug#1151333: fixed in dh-go 1.70
has caused the Debian Bug report #1151333,
regarding dh-go: a build pattern that matches nothing becomes a target, and the 
build fails on a directory name
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 [email protected]
immediately.)


-- 
1151333: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1151333
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dh-go
Version: 1.69
Severity: normal

get_targets() calls "go list -e". With -e, a pattern that matches no package
comes back as if it were a package name. The code drops only the pattern
built from DH_GOPKG, so any other pattern from DH_GOLANG_BUILDPKG stays in
the list of targets.

The build step opens every target as a directory under the build directory,
so it stops here:

  dh_auto_build: error: Unable to open directory
  _build/src/github.com/theupdateframework/go-tuf/v0/... No such file or 
directory

That path is a pattern, not a directory. The message does not say that one of
the patterns in DH_GOLANG_BUILDPKG matched nothing, and that is the real
problem. I hit this while porting golang-github-theupdateframework-go-tuf to
dh-go. The module in that pattern was not in go.work yet, which was my
mistake in debian/rules, but the message took a long time to understand.

Please merge
https://salsa.debian.org/go-team/dh-go/-/merge_requests/6

--- a/lib/Debian/Debhelper/Buildsystem/golang.pm
+++ b/lib/Debian/Debhelper/Buildsystem/golang.pm
@@ -1282,9 +1282,19 @@ sub get_targets {
     );
     my @targets = split(/\n/, $output);
 
-    # Ensure that the pattern "$ENV{DH_GOPKG}/..." with three
-    # literal dots is not included in the targets.
-    @targets = grep { !m{$ENV{DH_GOPKG}/\.\.\.} } @targets;
+    # With "go list -e", a pattern which matches no package comes back as
+    # if it were a package. Such a target is not a package. Later steps
+    # open every target as a directory of the build directory, so the
+    # build stops with "Unable to open directory", which does not say
+    # which pattern is wrong. Drop those targets and name them instead.
+    my @unresolved = grep { m{/\.\.\.} } @targets;
+    if (@unresolved) {
+        warning("These build patterns match no package:");
+        foreach my $pattern (sort uniq(@unresolved)) {
+            warning("   - $pattern");
+        }
+    }
+    @targets = grep { !m{/\.\.\.} } @targets;
 
     # Remove all targets that are matched by one of the regular expressions
     # in DH_GOLANG_EXCLUDES.

A warning keeps the current behaviour of going on with the targets that did
resolve. An error would be fine by me as well, and it would catch the case
where a package silently stops building part of itself.

--- End Message ---
--- Begin Message ---
Source: dh-go
Source-Version: 1.70
Done: Dr. Tobias Quathamer <[email protected]>

We believe that the bug you reported is fixed in the latest version of
dh-go, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <[email protected]> (supplier of updated dh-go 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 [email protected])


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

Format: 1.8
Date: Fri, 06 Nov 2026 18:52:19 +0100
Source: dh-go
Architecture: source
Version: 1.70
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <[email protected]>
Changed-By: Dr. Tobias Quathamer <[email protected]>
Closes: 1150077 1151331 1151332 1151333 1152595
Changes:
 dh-go (1.70) unstable; urgency=medium
 .
   [ Juan Manuel Mendez Rey ]
   * Do not let an installed copy shadow the module being built
     Closes: #1151332
   * Name the build patterns which match no package
     Closes: #1151333
   * Report the module which is missing, not the one which requires it
     Closes: #1151331
 .
   [ Dr. Tobias Quathamer ]
   * Fix wrong location of go.mod in the build directory.
     Closes: #1150077
   * Run perltidy
   * Fix go.work in autopkgtest.
     Thanks to Juan Manuel Méndez Rey <[email protected]>
     Closes: #1152595
 .
   [ Tiago Ilieve ]
   * Look for module in the package parent directories
   * Skip modules for directories already mapped
Checksums-Sha1:
 692e0a946131ec3639603b3f07dfbad5a9bbfbfd 1726 dh-go_1.70.dsc
 4bb5e2ea0d389e39bb52b598b256b341cdde7936 29312 dh-go_1.70.tar.xz
 e615de7df008859681cbdc02d64d0e20ebb9c3d0 5376 dh-go_1.70_amd64.buildinfo
Checksums-Sha256:
 c851a054a2b9968922f282ba7a406d1052d06bb23ef18e04b4f4d1aac0edea13 1726 
dh-go_1.70.dsc
 fa47bddcd3780e00294058a71def918032d6a7b02de5beeb933ddde1432ce1ec 29312 
dh-go_1.70.tar.xz
 6a30b9f063beb64e4bc9c87c7d3adb4390ddac91f94748811ef286a71855cc09 5376 
dh-go_1.70_amd64.buildinfo
Files:
 c2654c3d11640e3afbda31f169be0c01 1726 golang optional dh-go_1.70.dsc
 64173298564461d571a33bcc8715ebeb 29312 golang optional dh-go_1.70.tar.xz
 167be381f6daa4e2a42c444debbbb3e4 5376 golang optional 
dh-go_1.70_amd64.buildinfo

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

iQIzBAEBCgAdFiEE0cuPObxd7STF0seMEwLx8Dbr6xkFAmruFTUACgkQEwLx8Dbr
6xl4ew//agsgk2MY37FcPSuNuGxbM+1gUcJa4VZRJLuCKpq0pL6YmC+ZW1ikDvVA
VjSvNZY0ZD3q1s9FYshxsTftVJhV7Em6OytgSzCBMnyIMe+qUAOisSftHjVBEkIE
ODASFteYqBE+6VoE5mgp3jG/rZPLErTum9A9YjguT1JSHgmwn1lljM21XCChzPpE
S9rQb5QfUd7gFaRihhdf+mEviZc7WtBSty/1879VO5RHMDD/yWijKW6mggB/BCr0
gdAiW2D1KnZ2Ia275rrOQvQs3lD4ioLpMLZVkSq1FHExdFI+Sa5YZKpwWgxya+bN
nXXhl3+//poOhS5rWBwzrTaahRlUJ9Bt2x0NdovKGKZv9Sl+qdW+w+FMmLLYXFVx
A63aXcyvCcCORPvRHSpIlZg/cjiZLkaAVt1F6WBsgYBoIV6FIqxoblyASxpECdUo
ZrdE6vBLsT9bzMDJa4+SwF59gYRsXOoY2oHDBJvb1r5wvqfoID6yE1xNnQAqy7Kp
hzw3kYssaoizhl+16XY8guQb6wxzdMtO4G25NJ3RYBgTubh4EBmnnVeBYOjWH2UN
xmUR6m5NAEoCxOhUgFwu3JfmqhpK/AbnGARrI7BExkUsQ78miyyAgHi2kpP5FST0
pEZt5zOrlw4gEkx4stFk1Oli74wuUdHhf8AzuZUvO1byj48xuNI=
=Vd0z
-----END PGP SIGNATURE-----

Attachment: pgpf0OLkYXYuk.pgp
Description: PGP signature


--- End Message ---

Reply via email to