Article View: linux.debian.bugs.dist
Article #1378Bug#1151331: dh-go: the missing mappings report names the module that requires, not the one that is missing
From: Juan Manuel Mendez Rey
Date: Mon, 19 Oct 2026 18:50
Date: Mon, 19 Oct 2026 18:50
63 lines
4127 bytes
4127 bytes
Package: dh-go
Version: 1.69
Severity: normal
dh_auto_build parses "go list -m all" and lists the modules that still need a
mapping. Those lines come in two shapes:
go: a/b@v1.0.0: module lookup disabled by GOPROXY=off
go: a/b@v1.0.0 requires c/d@v2.0.0: module lookup disabled by GOPROXY=off
The regexp takes the first module of the line. On the second shape that is
a/b, which is present and already mapped, and c/d, the module that is really
missing, never shows up in the report. So the maintainer is told to map a
module that needs nothing, and the one to map is not named.
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
@@ -1360,11 +1360,17 @@ sub build {
open(my $golist, "-|", "go list -m all 2>&1")
or error("Failed to run 'go list': $!");
while (<$golist>) {
- # Relevant lines are formatted like this:
+ # Relevant lines are formatted in one of these two ways:
# go: github.com/a/b@v0.2.0: module lookup disabled by GOPROXY=off
- # Extract module path after 'go: ' and before '@'
+ # go: github.com/a/b@v0.2.0 requires github.com/c/d@v1.0.0: module
+ # lookup disabled by GOPROXY=off
+ # The module which is missing is always the last one of the line.
+ # In the second form, the first one is the module which requires it
+ # and that module is present, so reporting it sends the maintainer
+ # to map something which is mapped already.
push(@missing_mappings, $1)
- if m/^\s*go: (.+?)\@v.+: module lookup disabled by GOPROXY=off/;
+ if
+ m/(?:^\s*go: |requires )(\S+)\@v\S+: module lookup disabled by GOPROXY=off/;
}
close($golist);
Both regexps on both shapes:
line old new
go: a/b@v1.0.0: ... a/b a/b
go: a/b@v1 requires c/d@v2: ... a/b c/d
The real line that showed it, from a dh-go build of
golang-github-theupdateframework-go-tuf:
go: github.com/google/go-containerregistry@v0.20.7 requires
go.opentelemetry.io/auto/sdk@v1.1.0: module lookup disabled by GOPROXY=off
go-containerregistry is installed and mapped. auto/sdk is the one that is
missing.
Technical Details
Message-ID:
<NQ0AN-6AfM-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Juan Manuel Mendez Rey <juan.mendezr@proton.me> Newsgroups: linux.debian.bugs.dist Subject: Bug#1151331: dh-go: the missing mappings report names the module that requires, not the one that is missing Date: Mon, 19 Oct 2026 20:50:01 +0200 Message-ID: <NQ0AN-6AfM-7@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Oct 19 18:47:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.45 Reply-To: Juan Manuel Mendez Rey <juan.mendezr@proton.me>, 1151331@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+pkg-go@tracker.debian.org X-Debian-Pr-Message: report 1151331 X-Debian-Pr-Package: dh-go X-Debian-Pr-Source: dh-go Feedback-ID: 176548819:user:proton X-Pm-Message-ID: 60a5cbf18109b20f320ba4b8643784cd02284ace MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1997569 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 63 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 19 Oct 2026 18:44:57 +0000 X-Original-Message-ID: <2196bae43a7db8b8d0ffbe44aebf81cc@proton.me>