Core22 gnome extension and broken symlinks

Hello! I think the core22 gnome extension is maybe creating broken python symlinks (to /snap/gnome-42-2204-sdk/48/usr/bin/python3.10) causing a review-tools linter to fail:

 - lint-snap-v2:external_symlinks
        package contains external symlinks: bin/python -> python3, bin/python3 -> /snap/gnome-42-2204-sdk/48/usr/bin/python3.10, bin/python3.10 -> python3
cameractrls_0.4.11-0-gee26867_amd64.snap: FAIL

I can manually remove those symlinks and everything will work.

Contents of squashfs-root/usr/bin:

lrwxrwxrwx 1 graham graham    7 Nov 29 09:11 python -> python3
lrwxrwxrwx 1 graham graham   45 Nov 29 09:11 python3 -> /snap/gnome-42-2204-sdk/48/usr/bin/python3.10
lrwxrwxrwx 1 graham graham    7 Nov 29 09:11 python3.10 -> python3

Snapcraft, gnome-42-2204 and core 22 all from edge:

$ snapcraft --version
snapcraft 7.2.9.post29+git0f49a754

$ snap list | grep 'core22\|gnome-42'
core22          20221129         444    latest/edge   canonical**          base
gnome-42-2204   0+git.c271a86    46     latest/edge   canonical**          -

snapcraft.yaml for the snap:

1 Like

Thanks, @tigarmo has been working to solve all the Python related papercuts. This might be addressed soon.


I thought it was interesting that things still work if you remove the symlinks, but it looks like the Python code has no (Python) dependencies other than the standard library (so the broken virtual-env isn’t an issue).

1 Like

Hello, does the work include improving interoperability between the python plugin and the gnome extension? I’ve recently tried to update a snap from core20+python plugin+gnome-3-38 extension to core22 and gave up due the problem reported in this post, but I suspect I’d run into other issues, since the gnome extension sets PYTHONPATH. Thank you.

Hi, I am encountering the same issue with symlinks breaking my python app when using core22 + python plugin + gnome extension.

I’m also open to trying out any workarounds such as I can manually remove those symlinks and everything will work. Would something like that be best placed in an override-stage or override-prime section?


I had hoped the issue would be fixed so I’ve not writen a solution into the snapcraft.yaml. To do this manually:

  1. unsquashfs <snapname>
  2. rm squashfs-root/bin/python*
  3. snap pack squashfs-root

The resultant snap won’t have the symlinks and can be safely uploaded to the store.