Hello
The golang-gopkg-yaml.v2-dev package uses the gopkg.in redirector that,
as of version 2.4.3-1, contains the following tree:
$ dpkg -L golang-gopkg-yaml.v2-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/golang-gopkg-yaml.v2-dev
/usr/share/doc/golang-gopkg-yaml.v2-dev/NOTICE
/usr/share/doc/golang-gopkg-yaml.v2-dev/changelog.Debian.gz
/usr/share/doc/golang-gopkg-yaml.v2-dev/copyright
/usr/share/gocode
/usr/share/gocode/src
/usr/share/gocode/src/go.yaml.in
/usr/share/gocode/src/go.yaml.in/yaml
/usr/share/gocode/src/go.yaml.in/yaml/v2
/usr/share/gocode/src/go.yaml.in/yaml/v2/apic.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/decode.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/decode_test.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/emitterc.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/encode.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/encode_test.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/example_embedded_test.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/go.mod
/usr/share/gocode/src/go.yaml.in/yaml/v2/limit_test.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/parserc.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/readerc.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/resolve.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/scannerc.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/sorter.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/suite_test.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/writerc.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/yaml.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/yamlh.go
/usr/share/gocode/src/go.yaml.in/yaml/v2/yamlprivateh.go
/usr/share/gocode/src/gopkg.in
/usr/share/gocode/src/gopkg.in/yaml.v2
Note that the package source is in go.yaml.in but there's an empty
directory at gpokg.in/yaml.v2 -- the import path.
Looking at the changelog I see that there's some recent-ish upload that
may be causing this to break:
golang-yaml.v2 (2.4.2-1) unstable; urgency=medium
* Team upload.
* New upstream version 2.4.2 (Closes: #1111128)
* d/control:
- Add go.yaml.in/yaml/v2 to XS-Go-Import-Path
- Bump Standards-Version to 4.7.2 (no changes)
* d/copyright:
- Declare Arthur Diniz author to debian copyright
- Update Source and Upstream-Name to the new upstream
* d/gitlab-ci.yml: Update to new pipeline format
* d/links: Create symbolic link for compatibility with previous go path
* d/u/metadata: Update GitHub repository URL to yaml/go-yaml
* d/watch: Update GitHub URL to new upstream yaml/go-yaml
-- Arthur Diniz <[email protected]> Thu, 21 Aug 2025 22:12:55 +0000
When golang-gopkg-yaml.v2-dev is used as a build-dependency, debhelper
constructs a _build tree that has an empty directory (the
gopkg.in/yaml.v2) instead of the place where all of the source code is:
$ ls _build/src/gopkg.in/ -l
total 4
drwxr-xr-x. 1 root root 508 Mar 17 2025 check.v1
drwxr-xr-x. 1 root root 250 Jan 26 11:22 macaroon.v1
drwxr-xr-x. 1 root root 594 Jan 17 2025 mgo.v2
drwxr-xr-x. 1 root root 166 Jan 17 2025 retry.v1
drwxr-xr-x. 1 root root 146 Jan 17 2025 tomb.v2
drwxr-xr-x. 1 root root 22 Jan 17 2025 tylerb
drwxr-xr-x. 1 root root 0 Jan 26 11:22 yaml.v2
lrwxrwxrwx. 1 root root 21 Feb 27 09:31 yaml.v3 -> ../go.yaml.in/yaml/v3
Then the code is actually in:
$ find _build/src/go.yaml.in/yaml/v2/
_build/src/go.yaml.in/yaml/v2/
_build/src/go.yaml.in/yaml/v2/apic.go
_build/src/go.yaml.in/yaml/v2/decode.go
_build/src/go.yaml.in/yaml/v2/decode_test.go
_build/src/go.yaml.in/yaml/v2/emitterc.go
_build/src/go.yaml.in/yaml/v2/encode.go
_build/src/go.yaml.in/yaml/v2/encode_test.go
_build/src/go.yaml.in/yaml/v2/example_embedded_test.go
_build/src/go.yaml.in/yaml/v2/go.mod
_build/src/go.yaml.in/yaml/v2/limit_test.go
_build/src/go.yaml.in/yaml/v2/parserc.go
_build/src/go.yaml.in/yaml/v2/readerc.go
_build/src/go.yaml.in/yaml/v2/resolve.go
_build/src/go.yaml.in/yaml/v2/scannerc.go
_build/src/go.yaml.in/yaml/v2/sorter.go
_build/src/go.yaml.in/yaml/v2/suite_test.go
_build/src/go.yaml.in/yaml/v2/writerc.go
_build/src/go.yaml.in/yaml/v2/yaml.go
_build/src/go.yaml.in/yaml/v2/yamlh.go
_build/src/go.yaml.in/yaml/v2/yamlprivateh.go
But the compiler looks at this place, which is empty:
$ find _build/src/gopkg.in/yaml.v2
Any help untangling this is appreciated.