← Back to issue list

Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'

View original Github issue

Metadata

Project
snapcraft-rocks
Number
#109
Type
issue
State
open
Author
jkbeg
Labels
Type: Bug Status: Triaged
Created
Updated
Closed
—

Current evaluation

The :8_core22 image stages extensions under site-packages while Snapcraft expects them under /usr/share; the mismatch remains open, with a symlink workaround reported.

Suggested action: keep open

Reason: Maintainer @lengau confirmed that the image is "not organizing the extension scripts to somewhere where they'd be expected," and current code still resolves them under sys.prefix/share rather than the reported site-packages location. The exact image digest and reproduction are clear, although a complete ROS build remains unsupported there because the plugin depends on build snaps.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 35 Complexity: 30 Confidence: 91 Actionability: 86

Issue body

Initially opened this issue https://github.com/canonical/snapcraft/issues/5721 Since I did not get any response I suspect it was the wrong repository to address the docker issue. ### Bug Description Snapcraft fails to find its own extensions: ``` 2025-08-22T07:04:11.745Z [snapcraft] Initializing parts lifecycle 2025-08-22T07:04:13.827Z [snapcraft] **Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'.** 2025-08-22T07:04:13.828Z [snapcraft] Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250822-070411.734995.log' 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" stopped unexpectedly with code 1 ``` extensions path is hardcoded here: `usr/share/snapcraft/extensions` https://github.com/canonical/snapcraft/blob/df4ec6775a28d4a345c93d9f83a1193c0abc1c9d/snapcraft/extensions/extension.py#L135 but in latest docker container for snapcraft 8, ghcr.io/canonical/snapcraft:8_core22 (24050a02f9fe) extensions are located here: `/usr/lib/python3.10/site-packages/extensions/ros2` ### To Reproduce ```bash git clone https://github.com/snapcraft-docs/ros2-talker-listener-core22.git cd ros2-talker-listener-core22 docker run -v $(pwd):/project ghcr.io/canonical/snapcraft:8_core22 ``` ### Environment Ubuntu 22.04 LTS, Docker 28.3.1 ### snapcraft.yaml ```yaml name: ros2-talker-listener version: '0.1' summary: ROS 2 Talker/Listener Example description: | This example launches a ROS 2 talker and listener. confinement: devmode base: core22 parts: ros-demos: plugin: colcon source: https://github.com/ros2/demos.git source-branch: humble source-subdir: demo_nodes_cpp stage-packages: [ros-humble-ros2launch] apps: ros2-talker-listener: command: opt/ros/humble/bin/ros2 launch demo_nodes_cpp talker_listener.launch.py extensions: [ros2-humble] ``` ### Relevant log output ```shell docker run -v $(pwd):/project ghcr.io/canonical/snapcraft:8_core22 2025-08-22T07:04:05.252Z [pebble] Started daemon. 2025-08-22T07:04:05.284Z [pebble] POST /v1/services 16.330855ms 202 (http+unix) 2025-08-22T07:04:05.300Z [pebble] Service "snapcraft" starting: /bin/run-snapcraft.sh [ pack ] 2025-08-22T07:04:05.305Z [snapcraft] 2025-08-22T07:04:05.305Z [snapcraft] WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 2025-08-22T07:04:05.305Z [snapcraft] 2025-08-22T07:04:05.777Z [snapcraft] Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] 2025-08-22T07:04:05.922Z [snapcraft] Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] 2025-08-22T07:04:05.938Z [snapcraft] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] 2025-08-22T07:04:05.981Z [snapcraft] Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] 2025-08-22T07:04:06.031Z [snapcraft] Get:5 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB] 2025-08-22T07:04:06.080Z [snapcraft] Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB] 2025-08-22T07:04:06.249Z [snapcraft] Get:7 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB] 2025-08-22T07:04:06.272Z [snapcraft] Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB] 2025-08-22T07:04:06.298Z [snapcraft] Get:9 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [48.5 kB] 2025-08-22T07:04:06.317Z [pebble] GET /v1/changes/1/wait 1.032101461s 200 (http+unix) 2025-08-22T07:04:06.318Z [pebble] Started default services with change 1. 2025-08-22T07:04:06.408Z [snapcraft] Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1271 kB] 2025-08-22T07:04:06.948Z [snapcraft] Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5235 kB] 2025-08-22T07:04:07.779Z [snapcraft] Get:12 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3253 kB] 2025-08-22T07:04:08.583Z [snapcraft] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5430 kB] 2025-08-22T07:04:09.285Z [snapcraft] Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1575 kB] 2025-08-22T07:04:09.452Z [snapcraft] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [75.9 kB] 2025-08-22T07:04:09.465Z [snapcraft] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3569 kB] 2025-08-22T07:04:09.856Z [snapcraft] Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [83.2 kB] 2025-08-22T07:04:09.860Z [snapcraft] Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB] 2025-08-22T07:04:09.986Z [snapcraft] Fetched 40.9 MB in 5s (8818 kB/s) 2025-08-22T07:04:09.986Z [snapcraft] Reading package lists... 2025-08-22T07:04:10.683Z [snapcraft] Building dependency tree... 2025-08-22T07:04:10.813Z [snapcraft] Reading state information... 2025-08-22T07:04:10.827Z [snapcraft] 8 packages can be upgraded. Run 'apt list --upgradable' to see them. 2025-08-22T07:04:11.745Z [snapcraft] Initializing parts lifecycle 2025-08-22T07:04:13.827Z [snapcraft] Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'. 2025-08-22T07:04:13.828Z [snapcraft] Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250822-070411.734995.log' 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" stopped unexpectedly with code 1 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" on-failure action is "shutdown", triggering failure shutdown 2025-08-22T07:04:13.956Z [pebble] Server exiting! Reason: <nil> ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 58
Quick Win: 35
Complexity: 30
Confidence: 91
Actionability: 86
keep open The :8_core22 image stages extensions under site-packages while Snapcraft expects them under /usr/share; the mismatch remains open, with a symlink workaround reported.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 30
Confidence: 70
Actionability: 60
keep open Snapcraft Docker image fails to locate extensions because get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions are installed in site-packages.
qwen/qwen3.8-27b
Impact: 50
Quick Win: 30
Staleness: 55
Complexity: 40
Confidence: 80
Support Request: 10
keep open Snapcraft 8 Docker image (ghcr.io/canonical/snapcraft:8_core22) fails to resolve ros2 extension: get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions live in site-packages. Triaged, acknowledged by maintainer, workaround shared, still open.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 27
Staleness: 50
Complexity: 40
Confidence: 75
Support Request: 10
keep open Snapcraft 8 Docker image (snapcraft-rocks) installs extensions under site-packages but code expects /usr/share/snapcraft/extensions, breaking all extension usage. Triaged, acknowledged by maintainer, workaround via symlink provided, no fix yet.
qwen/qwen3.6-35b-a3b
Staleness: 55
Complexity: 20
Confidence: 85
Support Request: 0
keep open Bug report for snapcraft Docker image where extension paths are misconfigured, causing build failures. Triaged and acknowledged by maintainers, with a community workaround provided but no official fix yet.
qwen3.6-35b-a3b-mtp-q6
Staleness: 60
Complexity: 30
Confidence: 85
Support Request: 10
keep open Snapcraft fails to locate extensions in Docker due to a hardcoded path mismatch. Triaged and acknowledged by maintainers, with a community workaround provided but no official fix yet.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: canonical/snapcraft#5721 (confidence 99%)

    The reporter explicitly identifies this as the same issue in the main Snapcraft repository, which remains open with the same path mismatch.

Related issues

Issue Project State Summary Similarity
#5721 Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'. snapcraft open Snapcraft's 8_core22 container resolves extension data under /usr/share while the image installs it in site-packages, breaking ROS 2 builds; the path mismatch remains in current code.
93%