#1128592 golang-gopkg-yaml.v2-dev: installs code to yaml/v2 instead of yaml.v2

#1128592#5
Date:
2026-02-21 17:14:52 UTC
From:
To:
golang-gopkg-yaml.v2-dev installs its gocode into
/usr/share/gocode/src/go.yaml.in/yaml/v2

But packages (such as rclone 1.65.0) seem to be expecting to find the
code in yaml.v2 not yaml/v2.

cf. golang-gopkg-validator.v2-dev, which installs into validator.v2
not validator/v2

It looks like there should be a compatibility link generated by debian/links.
https://salsa.debian.org/go-team/packages/golang-yaml.v2/-/commit/15b38821bfe8587b0550f5bf185e36499455f01b

It should have come with 2.4.2-1.
Looks like something's gone wrong with the link in 2.4.3-1

#1128592#10
Date:
2026-02-21 17:23:12 UTC
From:
To:
The link that is broken is /usr/share/gocode/src/gopkg.in/yaml.v2
#1128592#17
Date:
2026-02-23 19:20:52 UTC
From:
To:
Please be aware of the difference between the domain of gopkg.in
domain vs go.yaml.in.

go.yaml.in forks from gopkg.in, they even have different Github repo,
github.com/go-yaml/yaml vs github.com/yaml/go-yaml. Yeah, they are
confusing...

Looks like Arthur wanted to package the new fork, but updated the
existing old package and reused the old package name. Ref:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111128

The link is still in 2.4.3-1

$ ls -l usr/share/gocode/src/gopkg.in/yaml.v2
lrwxrwxrwx 1 zsj zsj 21 Nov  3 22:46
usr/share/gocode/src/gopkg.in/yaml.v2 -> ../go.yaml.in/yaml/v2

It looks valid. I'm not sure why rclone fails to build with that.
Could you show more logs?
Anyway this is just a hack with the old GOPATH build mode and may stop working.

#1128592#22
Date:
2026-02-23 19:39:17 UTC
From:
To:
I think it's just an upgrade issue. Not a huge problem but one the
package should manage.
In the past the path was gopkg.in/yaml.v2. Now it's go.yaml.in/yaml/v2.
The link has been added to help the transition.

The problem is with an upgrade transition, not in a new installation.  A
new installation just gets gopkg.in/yaml.v2. as the symlink.

The problem is that previously gopkg.in/yaml.v2 was a directory not a
link.  Its contents get removed on upgrade, but the debian installations
scripts do not replace an existing (empty) directory with the new
symlink.

The same problem was reported for golang-gopkg-yaml.v3-dev in
Bug#1118270
They pointed at the solution documented at
https://manpages.debian.org/unstable/dpkg/dpkg-maintscript-helper.1.en.html#Switching_a_directory_to_symlink

Drew
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118270