← 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
Number
#5721
Type
issue
State
open
Author
jkbeg
Labels
—
Created
Updated
Closed
—

Current evaluation

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.

Suggested action: needs triage

Reason: The report provides an exact image digest, sample repository, one-command reproducer, logs, and both conflicting paths; current get_extensions_data_dir() still returns sys.prefix/share/snapcraft/extensions despite the container placing assets in site-packages. With no labels, maintainer comments, or other triage activity, this valid but unresolved report still needs maintainer assessment.

Evaluated by: mr-cal-bot

Impact: 60 Quick Win: 35 Complexity: 38 Confidence: 94 Actionability: 94

Issue body

### 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: 60
Quick Win: 35
Complexity: 38
Confidence: 94
Actionability: 94
needs triage 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.
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 29
Complexity: 40
Confidence: 75
Actionability: 80
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. Valid bug with clear reproducer.
qwen/qwen3.8-27b
Impact: 55
Quick Win: 33
Staleness: 75
Complexity: 40
Confidence: 70
Support Request: 10
needs triage Snapcraft 8 Docker image fails to resolve ros2 extension: get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions are installed under site-packages/extensions. Untriaged, no maintainer activity in 374 days; same bug tracked in snapcraft-rocks#109.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Snapcraft fails to locate extensions due to hardcoded path mismatch in Docker container. No maintainer response, issue is 334 days old and completely inactive.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Snapcraft fails to locate ROS2 extension due to hardcoded path mismatch in Docker container. Issue is 320 days old with no maintainer response or labels.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: snapcraft-rocks#109 (confidence 92%)

    Open report has the same failure and identifies the same sys.prefix/share versus site-packages extension-data mismatch.

Related issues

Issue Project State Summary Similarity
#109 Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2' snapcraft-rocks 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.
93%