← Back to issue list

classic confinement requires manually setting PATH and PYTHONPATH

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1670749
Type
issue
State
open
Author
~corey.bryant
Labels
openstack
Created
Updated
Closed
—

Current evaluation

Classic snaps may need explicit PATH/PYTHONPATH, but the reporter and snappy team said this was by design; current metadata handling intentionally omits injected PATH and library paths.

Suggested action: close not a bug

Reason: The reporter said the snappy team confirmed the behavior was designed, and later found PYTHONPATH unnecessary in Snapcraft 2.22, narrowing the original need to PATH for a command invoked by name. Current classic-confinement tests preserve this behavior, while commit 9b6e58337 (#4216) explicitly stopped injecting PATH and LD_LIBRARY_PATH; the later Python 3 claims lacked a minimal reproducer.

Evaluated by: mr-cal-bot

Impact: 36 Quick Win: 9 Complexity: 55 Confidence: 84 Actionability: 55

Issue body

I have to manually set PATH and PYTHONPATH to include $SNAP/bin/ and $SNAP/lib/python2.7/site-packages when creating a snap with classic confinement. Using 'environment:' works fine to set these, but it seems like I shouldn't have to take this extra step. environment:   PATH: $PATH:$SNAP/bin/   PYTHONPATH: $PYTHONPATH:$SNAP/lib/python2.7/site-packages Note: This is when using the python plugin, so perhaps it's limited to that.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 36
Quick Win: 9
Complexity: 55
Confidence: 84
Actionability: 55
close not a bug Classic snaps may need explicit PATH/PYTHONPATH, but the reporter and snappy team said this was by design; current metadata handling intentionally omits injected PATH and library paths.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 11
Complexity: 61
Confidence: 80
Actionability: 59
keep open Classic Python snaps have intermittently required manual PATH/PYTHONPATH and correct PATH ordering across Snapcraft 2.27.1–3.7, despite an earlier “working as designed” conclusion; the issue remains unresolved.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 14
Complexity: 20
Confidence: 60
Actionability: 60
needs triage Classic confinement python plugin requires manual PATH and PYTHONPATH setup. Open for 9.5 years with no maintainer response.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21
Staleness: 95
Complexity: 40
Confidence: 55
Support Request: 30
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 65
close stale Reporter notes manual PATH and PYTHONPATH setup is needed for classic confinement with the python plugin. Issue has zero comments and no maintainer activity for over 7 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 20
close stale Classic confinement snaps using the python plugin require manual PATH and PYTHONPATH configuration. The issue has been inactive for over 7 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 92
Support Request: 30
close stale Issue reports manual PATH and PYTHONPATH setup needed for classic confinement with the python plugin. Unanswered for over 9 years, likely outdated due to snapcraft evolution.

Update history

Date Change
created

Related work

  • Related To: snapcraft#4216 (confidence 96%)

    Commit 9b6e58337 intentionally omits PATH and LD_LIBRARY_PATH for classic confinement, matching current test expectations.

Related issues

Issue Project State Summary Similarity
#4187 Environment is being set for classic snaps snapcraft closed Classic-confinement snaps no longer receive top-level LD_LIBRARY_PATH and PATH; fixed by merged PR #4216 in commit 9b6e58337.
72%