sids
Posts: 2
Joined: Sun Dec 20, 2020 2:53 am

Trouble upgrading from 20.10 to 21.04 - bluetoth

Wed Jun 16, 2021 12:14 am

Hello,
I'm trying to upgrade my rpi 4.
Linux home2 5.8.0-1026-raspi #29-Ubuntu SMP PREEMPT Tue Jun 1 09:35:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
The problem is a badly installed (or half installed) pi-bluethooth. (Maybe that there are 2 versions is the issue?)
$ apt list -a --upgradeable
Listing... Done
pi-bluetooth/raspi 0.1.15ubuntu2-lobo arm64 [upgradable from: 0.1.15ubuntu1.1~20.10.1]
pi-bluetooth/groovy-updates,now 0.1.15ubuntu1.1~20.10.1 arm64 [installed,upgradable to: 0.1.15ubuntu2-lobo]
pi-bluetooth/groovy 0.1.15ubuntu1 arm64

But when I try I get
The following packages will be upgraded:
pi-bluetooth
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/4,687 kB of archives.
After this operation, 16.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 187377 files and directories currently installed.)
Preparing to unpack .../pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb ...
dpkg-divert: error: 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by pi-bluetooth' clashes with 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by linux-firmware-raspi2'
dpkg: error processing archive /var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb (--unpack):
new pi-bluetooth package pre-installation script subprocess returned error exit status 2
dpkg-divert: warning: please specify --no-rename explicitly, the default will change to --rename in 1.20.x
dpkg-divert: error: --add needs a single argument

Use --help for help about diverting files.
dpkg: error while cleaning up:
new pi-bluetooth package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried removing it, but that didn't work either
$ apt remove pi-bluetooth
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
pi-bluetooth
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 29.7 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: error processing package pi-bluetooth (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
dpkg: too many errors, stopping
Errors were encountered while processing:
pi-bluetooth
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

It suggests reinstalling, but that doesn't work either.
$ apt reinstall pi-bluetooth
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
pi-bluetooth
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/4,687 kB of archives.
After this operation, 16.9 MB of additional disk space will be used.
(Reading database ... 187377 files and directories currently installed.)
Preparing to unpack .../pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb ...
dpkg-divert: error: 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by pi-bluetooth' clashes with 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by linux-firmware-raspi2'
dpkg: error processing archive /var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb (--unpack):
new pi-bluetooth package pre-installation script subprocess returned error exit status 2
dpkg-divert: warning: please specify --no-rename explicitly, the default will change to --rename in 1.20.x
dpkg-divert: error: --add needs a single argument

Use --help for help about diverting files.
dpkg: error while cleaning up:
new pi-bluetooth package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Something about diverting (which I don't really understand), but it may already be diverted - is that the problem?
$ dpkg-divert --list | grep -i bluet
local diversion of /var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb to /var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb.distrib

Can anyone suggest how to proceed?
Thanks

larryr
Posts: 28
Joined: Mon Jul 20, 2020 7:28 pm

Re: Trouble upgrading from 20.10 to 21.04 - bluetoth

Fri Jun 18, 2021 3:28 am

I have the exact same issue with the bluetooth - I have tried to leave a message for loboris who owns that.

dpkg: error processing archive /var/cache/apt/archives/pi-bluetooth_0.1.15ubuntu2-lobo_arm64.deb (--unpack):
new pi-bluetooth package pre-installation script subprocess returned error exit status 2
dpkg-divert: warning: please specify --no-rename explicitly, the default will change to --rename in 1.20.x
dpkg-divert: error: --add needs a single argument

Return to “Ubuntu”