snapcraft breaks with python app
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without resolution. Snapcraft auto-generated invalid command paths starting with `/` for Python apps, causing snapd validation failures. No fix, discussion, or follow-up was provided.
Suggested action: —
No scores available.
Issue body
snapcraft version: 3.9.8, 3.9.9, and edge rev 4046
Following snapcraft.yaml fails to build
Snapcraft is trying to be smart and replaces usr/sbin/netplan with '/usr/bin/python3 $SNAP/usr/sbin/netplan' which then consequently fails internal check:
Failed to generate snap metadata: The specified command '/usr/bin/python3 $SNAP/usr/sbin/netplan' defined in the app 'netplan' does not match the pattern expected by snapd.
The command must consist only of alphanumeric characters, spaces, and the following special characters: / . _ # : $ -
Funny enough if one leave python as part of the snap, following line does pass the check:
'usr/bin/python3 $SNAP/usr/sbin/netplan'
Do we have check that command cannot start with '/' and at the same time auto generate such a command?
Shooting ourselves in own foot?
name: netplan-test
base: core18
version: '0.1'
summary: netplan test
description: |
This is my-snap's description. You have a paragraph or two to tell the
grade: stable
confinement: strict
parts:
netplan:
plugin: nil
stage-packages:
- netplan.io
stage:
- lib/netplan
- usr/sbin/netplan
- usr/share/netplan
apps:
netplan:
adapter: none
command: usr/sbin/netplan
environment:
PYTHONPATH: /usr/lib/python3/dist-packages:$PYTHONPATH
plugs:
- network
- network-bind
- network-setup-control
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft auto-generated invalid command paths starting with `/` for Python apps, causing snapd validation failures. No fix, discussion, or follow-up was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Snapcraft incorrectly auto-generated a command path for a Python app, causing snapd validation failures. No fix was provided. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. Snapcraft incorrectly auto-generates command paths starting with a slash for Python apps, triggering snapd validation failures. The report was closed without resolution due to inactivity. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1499429 snapcraft dies with "export: python3.5/dist-packages: bad variable name" | snapcraft (launchpad) | closed | Closed without resolution due to inactivity. Snapcraft crashes when py3versions returns multiple Python versions, generating a malformed PYTHONPATH that breaks the export command. | |
| #1778716 snapcraft clean snapcraft fails as it cannot find python | snapcraft (launchpad) | closed | Closed without comments or explicit resolution, likely abandoned or resolved in a later release. The bug reported a MissingPythonCommandError during snapcraft clean due to python3 path resolution ordering. | |
| #1723965 snapcraft doesn't work | snapcraft (launchpad) | closed | Closed without resolution or comments, indicating abandonment. The reported snap command failure and GL driver errors remain unresolved. | |
| #4300 snapcraft fails for python projects if there is no setup.py | snapcraft | closed | Closed as stale due to inactivity. Maintainers identified the failure as a missing entry_points or scripts configuration in pyproject.toml, not a snapcraft bug. | |
| #1573349 snapcraft examples are starting the binaries from outdated path | snapcraft (launchpad) | closed | Updated snapcraft example paths from /snaps/bin to /snap/bin to resolve failing tests. The fix was verified and the issue closed. | |
| #1674952 snapcraft tour broken when installed from snap | snapcraft (launchpad) | closed | The snapcraft tour command failed due to a missing directory path when installed via snap. The issue was closed without comments or documented resolution, indicating it was abandoned or fixed in a later release. | |
| #1710254 snapcraft doesn't fail if the command exists in the host but not in the prime directory | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft incorrectly validates app commands against the host system rather than the prime directory during the prime step, leaving the bug unfixed. | |
| #1884683 snapcraft fail app | snapcraft (launchpad) | open | Snapcraft 2.43.1+18.4 crashes with FileNotFoundError when an app's command points to /bin/Sastreria, which is missing from the prime directory. No comments or labels; the affected 2.x version is long EOL and the code path no longer exists. |