Package: dh-golang Version: 1.51 Severity: normal Greetings!
I was investigating autopkgtest failures for golang-yaml.v2 in Ubuntu, and found what I believe is a bug in dh-golang. I can reproduce equivalent failures on sid/bullseye as well. dh-golang attempts to use cp -a to populate a directory with go source code, but that directory is already partially populated with some symlinks, and cp -a doesn't like that. This fails the autopkgtest. adt log snippet: cp -a /usr/share/gocode/src "obj-x86_64-linux-gnu" cp: '/usr/share/gocode/src/gopkg.in/check.v1' and 'obj-x86_64-linux-gnu/src/gopkg.in/check.v1' are the same file cp: '/usr/share/gocode/src/github.com' and 'obj-x86_64-linux-gnu/src/github.com' are the same file cp: '/usr/share/gocode/src/launchpad.net' and 'obj-x86_64-linux-gnu/src/launchpad.net' are the same file Steps to reproduce: <download source for golang-yaml.v2> autopkgtest-build-lxd images:debian/sid autopkgtest golang-yaml.v2_2.4.0-1.dsc -- lxd autopkgtest/debian/sid/amd64 Note that this slightly different test passes! autopkgtest golang-yaml.v2 -- lxd autopkgtest/debian/sid/amd64 I assume this isn't golang-yaml.v2 specific, but have not proven that. I've got a suggested fix, using find to locate the symlinks and remove them before "cp -a". Please see my merge proposal, which adds a find invocation to remove symlinks. https://salsa.debian.org/go-team/packages/dh-golang/-/merge_requests/17 Thanks. -Dan -- System Information: Debian Release: bullseye/sid APT prefers hirsute-updates APT policy: (500, 'hirsute-updates'), (500, 'hirsute-security'), (500, 'hirsute-proposed'), (500, 'hirsute') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.11.0-18-generic (SMP w/16 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dh-golang depends on: ii debhelper 13.3.4ubuntu1 ii libdpkg-perl 1.20.9ubuntu1 ii perl 5.32.1-3ubuntu2 dh-golang recommends no packages. dh-golang suggests no packages. -- no debconf information