🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4052

Bug#1153669: dh-go: a sub-module is mapped by its directory, not by the module it declares

#4052
From: juan.mendezr
Date: Tue, 10 Nov 2026 19:50
31 lines
2810 bytes
Package: dh-go
Version: 1.71
Severity: important
Tags: patch
X-Debbugs-Cc: juan.mendezr@proton.me

_construct_modules walks the installed modules and records each sub-module
under the directory it found, not under the module path in its go.mod. Those
differ when the parent has a /vN suffix, because a sub-module carries the
suffix at the end:

  golang-lru/v2/arc declares github.com/hashicorp/golang-lru/arc/v2
  go-redis/extra/redisotel declares github.com/redis/go-redis/extra/redisotel/v9

So go.work replaces a path nobody asks for, and the build fails:

  no required module provides package github.com/hashicorp/golang-lru/arc/v2

The patch reads the module line from the sub-module go.mod, which that walk
already opens: https://salsa.debian.org/go-team/dh-go/-/merge_requests/14

Clean sid chroot: a 10 line package importing arc/v2 fails with 1.71 and
builds with the patch. distribution 3.1.2, which needs three such modules,
compiles with the patch and nothing in debian/rules. otel 1.46.0-3 still
builds with the same 125 tested packages, and the reproducer of
https://bugs.debian.org/1149023 still works.

Found by Rafael Passos in #debian-go while packaging distribution.
Technical Details
Message-ID: <NY00V-b4S1-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: juan.mendezr@proton.me
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153669: dh-go: a sub-module is mapped by its directory, not by the module it declares
Date: Tue, 10 Nov 2026 20:50:01 +0100
Message-ID: <NY00V-b4S1-1@gated-at.bofh.it>
X-Original-To: submit@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Tue Nov 10 19:47:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.44
Reply-To: juan.mendezr@proton.me, 1153669@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: juan.mendezr@proton.me, team+pkg-go@tracker.debian.org
X-Debian-Pr-Message: report 1153669
X-Debian-Pr-Package: dh-go
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: dh-go
Feedback-ID: 176548819:user:proton
X-Pm-Message-ID: 572412da9196e9857afa4bab5b918d09c44b7976
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/2001900
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 31
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 10 Nov 2026 19:44:44 +0000
X-Original-Message-ID: <effc612c1fabc76786755f1d3c83866a@proton.me>