1

In alpine edge, I have the packaged onboard installed, but it is failing to launch.

$ onboard
Traceback (most recent call last):
  File "/usr/bin/onboard", line 32, in <module>
    from Onboard.Exceptions import chain_handler
ModuleNotFoundError: No module named 'Onboard'

Looking at the contents of the package, it has libraries in site-packages for a newer python than the packaged one that is installed,

$ apk manifest onboard
sha1:81dbaf3b78893bb5d5896fd023409f12e580e1e9  etc/xdg/autostart/onboard-autosta                                                                                                                                  rt.desktop
sha1:687e5d9bce3c7cc92caee337207058a62ada86df  usr/bin/onboard
sha1:3c77e2705f8b8b2150002f28d31c5382952f639a  usr/bin/onboard-settings
sha1:40980337b28834148ec974557ca9c97000d88560  usr/lib/python3.10/site-packages/                                                                                                                                  onboard-1.4.1-py3.10.egg-info
[...]
$ apk list --installed python3
python3-3.9.7-r4 x86 {python3} (PSF-2.0) [installed]

I thought 3.9 was the newest packaged python available, but actually it isn't:

$ apk list python3
python3-3.9.7-r4 x86 {python3} (PSF-2.0) [installed]
python3-3.10.1-r0 x86 {python3} (PSF-2.0) [upgradable from: python3-3.9.7-r4]

but the 3.10 package that says upgradable isn't actually upgradable:

$ sudo apk upgrade python3
OK: 451 MiB in 1036 packages

Double checking that it's not pinned with a version constraint in world:

$ grep python /etc/apk/world
python3
python3-dbg
python3-tkinter

No.

What is happening?

1 Answer 1

1

If you attempt to pin the new python version you'll get a detailed list of other dependencies that are holding up the upgrade:

$ sudo apk add python3=3.10.1-r0
ERROR: unable to select packages:
  python3-3.9.7-r4:
    conflicts: python3-3.10.1-r0 python3-3.10.1-r0[so:libpython3.so=0] python3-3.10.1-r0[cmd:2to3=3.9.7-r4] python3-3.10.1-r0[cmd:pydoc3=3.9.7-r4] python3-3.10.1-r0[cmd:python3=3.9.7-r4]
    breaks: world[python3=3.10.1-r0]
    satisfies: glib-dev-2.70.1-r0[python3] py3-gobject3-3.42.0-r2[python3] py3-dbus-1.2.18-r1[python3] onboard-1.4.1-r6[python3] blueman-2.2.3-r1[python3] terminator-2.1.1-r2[python3]
               py3-pygdbmi-0.10.0.0-r2[python3] py3-configobj-5.0.6-r9[python3] py3-six-1.16.0-r1[python3] boost1.76-python3-1.76.0-r2[so:libpython3.9.so.1.0]
  python3-3.10.1-r0:
    conflicts: python3-3.9.7-r4 python3-3.9.7-r4[so:libpython3.so=0] python3-3.9.7-r4[cmd:2to3=3.10.1-r0] python3-3.9.7-r4[cmd:pydoc3=3.10.1-r0] python3-3.9.7-r4[cmd:python3=3.10.1-r0]
    satisfies: world[python3=3.10.1-r0] glib-dev-2.70.1-r0[python3] py3-gobject3-3.42.0-r2[python3] py3-dbus-1.2.18-r1[python3] onboard-1.4.1-r6[python3] blueman-2.2.3-r1[python3] terminator-2.1.1-r2[python3]
               py3-pygdbmi-0.10.0.0-r2[python3] py3-configobj-5.0.6-r9[python3] py3-six-1.16.0-r1[python3] gdb-11.1-r1[so:libpython3.10.so.1.0]

It's a little bit hard to parse that at first because the thing holding up the upgrade, the so dependency on libpython3.9 from boost1.76-python3, doesn't show up in the conflicts list for python 3.10, it only shows up in the satisfies list for python 3.9, but in any case it's clear once you notice it that would be a thing that would hold up the upgrade.

In alpine, you have this general situation:

  • python packages with a site-packages component but no compiled extensions that depend on libpython, like onboard, don't list a dependency on the particular python minor version they need, even though they obviously depend on it in order to work because it's in the name of the lib subdirectory they use in site-packages
  • things like boost's python support that use libpython do depend on the so file, and as a result do end up depending on the particular python package version
  • things like boost are sometimes packaged such that they get a different package name for each version (e.g. boost1.76), so even though evidently boost is still in the distro and there would be a boost*-python3 package contemporary with the current python in the rolling release, it's technically a different package (boost1.77-python3), and apk won't on its own figure out that upgrading to it is the solution

Because of these differences in the packaging approaches between different packages in the distro, the rolling release hits a bit of a snag.

Getting rid of the offending old package boost1.76-python3:

$ sudo apk del boost1.76-python3
World updated, but the following packages are not removed due to:
  boost1.76-python3: boost1.76-dev boost1.76

OK: 451 MiB in 1036 packages
$ sudo apk del boost1.76-dev
(1/1) Purging boost1.76-dev (1.76.0-r2)
OK: 277 MiB in 1035 packages
$ sudo apk del boost1.76
(1/34) Purging boost1.76 (1.76.0-r2)
...
(17/34) Purging boost1.76-python3 (1.76.0-r2)
...
(34/34) Purging boost1.76-serialization (1.76.0-r2)
Executing busybox-1.34.1-r5.trigger
OK: 268 MiB in 1001 packages

gets rid of the snag, and now apk upgrade will get the new python:

$ sudo apk upgrade
(1/2) Upgrading python3 (3.9.7-r4 -> 3.10.1-r0)
(2/2) Upgrading gdb (11.1-r0 -> 11.1-r1)
Executing busybox-1.34.1-r5.trigger
OK: 269 MiB in 1001 packages

Of course you can install the new boost1.77-python3 if you need it.

$ sudo apk add boost1.77-python3
(1/1) Installing boost1.77-python3 (1.77.0-r3)
OK: 269 MiB in 1002 packages

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .