[pkg-go] Bug#983855: golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Andreas Beckmann
anbe at debian.org
Tue Mar 2 21:26:55 GMT 2021
Control: reassign -1 dpkg 1.20.7.1
Control: retitle -1 dpkg: dpkg-realpath is broken
Control: severity -1 grave
Control: affects -1 + golang-github-coreos-bbolt-dev golang-github-xordataexchange-crypt-dev
Control: tag -1 - help
On 02/03/2021 17.35, Shengjing Zhu wrote:
> On Tue, Mar 2, 2021 at 5:24 PM Andreas Beckmann <anbe at debian.org> wrote:
>> during a test with piuparts I noticed your package fails to upgrade from
>> 'stretch'.
>> It installed fine in 'buster', then the upgrade to 'bullseye' fails.
>>
>> From the attached log (scroll to the bottom...):
>>
>> Preparing to unpack .../golang-github-coreos-bbolt-dev_1.3.5-1_all.deb ...
>> Unpacking golang-github-coreos-bbolt-dev (1.3.5-1) over (1.3.1-coreos.5-3) ...
>> dpkg: error processing archive /var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb (--unpack):
>> unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
>> Preparing to unpack .../libss2_1.46.1-1_amd64.deb ...
>> Unpacking libss2:amd64 (1.46.1-1) over (1.44.5-1+deb10u3) ...
>> Errors were encountered while processing:
>> /var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb
>>
>> /usr/share/gocode/src/go.etcd.io/bbolt is a symlink and possibly
>> dangling at the time the error happens:
>>
>> lrwxrwxrwx 1 root root 26 Jan 20 2019 /usr/share/gocode/src/go.etcd.io/bbolt -> ../github.com/coreos/bbolt
>>
>> Maybe some symlink_to_dir migration is missing?
>>
> Not sure what happens, it does have symlink_to_dir already.
> https://sources.debian.org/src/golang-github-coreos-bbolt/1.3.5-1/debian/maintscript/
The good thing is that it is easily reproducible ...
injecting set -x into dpkg-maintscript-helper reveals
Preparing to unpack .../golang-github-coreos-bbolt-dev_1.3.5-1_all.deb ...
+ local SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt
+ local SYMLINK_TARGET=/usr/share/gocode/src/github.com/coreos/bbolt
+ local LASTVERSION=1.3.3-1~
+ local PACKAGE=--
+ [ 1.3.3-1~ = -- ]
+ [ -- = -- -o -z -- ]
+ PACKAGE=golang-github-coreos-bbolt-dev:all
+ [ /usr/share/gocode/src/go.etcd.io/bbolt != -- -a 7 -gt 0 ]
+ shift
+ [ /usr/share/gocode/src/github.com/coreos/bbolt != -- -a 6 -gt 0 ]
+ shift
+ [ 1.3.3-1~ != -- -a 5 -gt 0 ]
+ shift
+ [ -- != -- -a 4 -gt 0 ]
+ [ 4 -gt 0 ]
+ shift
+ [ -n preinst ]
+ [ -n golang-github-coreos-bbolt-dev ]
+ [ -n golang-github-coreos-bbolt-dev:all ]
+ [ -n /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ usr/share/gocode/src/go.etcd.io/bbolt = /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ /usr/share/gocode/src/go.etcd.io/bbolt = /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ -n /usr/share/gocode/src/github.com/coreos/bbolt ]
+ [ -n upgrade ]
+ validate_optional_version 1.3.3-1~
+ local VERSION=1.3.3-1~
+ [ -z 1.3.3-1~ ]
+ dpkg --validate-version -- 1.3.3-1~
+ VERSIONCHECK=
+ debug Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
+ [ -n 1 ]
+ echo DEBUG: dpkg-maintscript-helper: Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
DEBUG: dpkg-maintscript-helper: Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
+ debug SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
+ [ -n 1 ]
+ echo DEBUG: dpkg-maintscript-helper: SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
DEBUG: dpkg-maintscript-helper: SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
+ [ upgrade = install -o upgrade = upgrade ]
+ [ -n 1.3.1-coreos.5-3 ]
+ [ -h /usr/share/gocode/src/go.etcd.io/bbolt ]
+ symlink_match /usr/share/gocode/src/go.etcd.io/bbolt /usr/share/gocode/src/github.com/coreos/bbolt
+ local SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt
+ local SYMLINK_TARGET=/usr/share/gocode/src/github.com/coreos/bbolt
+ readlink /usr/share/gocode/src/go.etcd.io/bbolt
+ [ ../github.com/coreos/bbolt = /usr/share/gocode/src/github.com/coreos/bbolt ]
+ dpkg-realpath /usr/share/gocode/src/go.etcd.io/bbolt
+ [ /github.com/coreos/bbolt = /usr/share/gocode/src/github.com/coreos/bbolt ]
+ exit 0
Unpacking golang-github-coreos-bbolt-dev (1.3.5-1) over (1.3.1-coreos.5-3) ...
dpkg: error processing archive /var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb (--unpack):
unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
# readlink /usr/share/gocode/src/go.etcd.io/bbolt
../github.com/coreos/bbolt
# readlink -f /usr/share/gocode/src/go.etcd.io/bbolt
/usr/share/gocode/src/github.com/coreos/bbolt
# dpkg-realpath /usr/share/gocode/src/go.etcd.io/bbolt
/github.com/coreos/bbolt
The output from dpkg-realpath is wrong, causing
dpkg-maintscript-helper to skip its job.
Severity grave since I'm afraid that bug prepares for future upgrade
errors since several dpkg-maintscript-helper actions may have been
silently skipped without causing immediate trouble.
Andreas
More information about the Pkg-go-maintainers
mailing list