classic snap are missing some env variables for reaching command name. (snap build, executing it fails)
Metadata
Current evaluation
Classic-confinement snapcraft 2.27.1 app wrappers omit $SNAP/bin from PATH, so bare command names fail at runtime and shebangs resolve to system binaries instead of snap ones. Reported 2017, zero comments; later addressed in snapcraft via snapcraft-runner workaround (#2889).
Suggested action: close stale
Reason: Filed against snapcraft 2.27.1 on Ubuntu 16.04 in March 2017 with zero comments and no maintainer interaction for ~9.5 years. The underlying classic PATH problem was explicitly addressed later in the codebase: commit 343ac2862 'meta: always generate snapcraft-runner to workaround classic PATH bug (#2889)', and the old snapd workaround was removed for core20+ in #3087. The affected version is long unsupported and the behavior is superseded, so it is no longer applicable.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
20.25
Staleness:
95
Complexity:
55
Confidence:
65
Support Request:
10
|
close stale | Classic-confinement snapcraft 2.27.1 app wrappers omit $SNAP/bin from PATH, so bare command names fail at runtime and shebangs resolve to system binaries instead of snap ones. Reported 2017, zero comments; later addressed in snapcraft via snapcraft-runner workaround (#2889). | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
40
Confidence:
90
Support Request:
10
|
close stale | Classic snap command wrapper fails to include $SNAP/bin in PATH, causing execution failures. Reported in 2017 for snapcraft 2.27.1 on Ubuntu 16.04; remains unaddressed and outdated. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
45
Confidence:
85
Support Request:
10
|
close stale | Classic snaps fail to execute commands due to missing $SNAP/bin/ in wrapper PATH, causing execution errors and fallback to system binaries. Unaddressed since 2017. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
45
Confidence:
95
Support Request:
15
|
close stale | Classic snap wrapper generation bug on Ubuntu 16.04 where $SNAP/bin/ is not added to PATH, causing command execution failures. Issue is over 9 years old and targets an EOL distribution. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
40
Confidence:
90
Support Request:
5
|
close stale | Classic snap wrapper scripts omit $SNAP/bin/ from PATH, causing command execution failures and forcing fallback to system binaries instead of snap versions. Reported against snapcraft 2.27.1 on Xenial. Open, unassigned, awaiting triage. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft/snapcraft#2889
(confidence 70%)
Commit 343ac2862 'meta: always generate snapcraft-runner to workaround classic PATH bug (#2889)' directly targets the classic PATH bug described here.
-
Related To:
snapcraft/snapcraft#3087
(confidence 55%)
'meta: remove snapd workaround for classic for core20 onwards (#3087)' indicates the classic PATH workaround was superseded on newer bases.
-
Related To:
snapcraft/snapcraft#4216
(confidence 45%)
'meta: omit LD_LIBRARY_PATH and PATH in classic confinement (#4216)' shows continued deliberate handling of PATH in classic confinement.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1681861 classic snaps recurse | snapcraft (launchpad) | open | Classic snap command wrappers generated by snapcraft use bare command names instead of $SNAP/bin/command paths, causing failures since PATH is not reset in classic confinement. 3429 days old, no labels, no comments, no maintainer interaction. | |
| #1681722 classic snaps cannot find stage packages in $PATH | snapcraft (launchpad) | open | Classic snaps with stage-packages cannot find dependent binaries because snap bin directories are missing from default PATH. 9+ years old, zero comments, no labels. A related workaround (PR #2889, snapcraft-runner) was merged to address classic snap PATH resolution. | |
| #1681152 snap may execute host, not wrapped, executables | snapcraft (launchpad) | open | Classic-confinement snap wrappers in /snap/bin may execute host executables instead of the snap's wrapped ones due to PATH resolution. Reported 2017, no maintainer interaction, no labels. Workaround (snapcraft-runner) merged in PR #2889. | |
| #1670749 classic confinement requires manually setting PATH and PYTHONPATH | snapcraft (launchpad) | open | Classic-confinement snaps built with the python plugin require manually setting PATH and PYTHONPATH via environment: to include $SNAP/bin and $SNAP/lib/python2.7/site-packages; reporter argues snapcraft should do this automatically. No maintainer response or labels; issue is ~9 years old. |