Catkin plugin: empty segment added to PYTHONPATH
Bug #1714333 reported by
Kyle Fazzari
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Kyle Fazzari |
Bug Description
The Catkin plugin puts something along the following lines into the environment:
export PYTHONPATH=
Which apparently is a bad thing, because if $PYTHONPATH is empty, that puts an empty segment on the PYTHONPATH which Python interprets as `.`, thus adding the current working directory to it. There are some modules that walk the PYTHONPATH (e.g. pkg_resources), and the current working directory is often inaccessible to the snap in confinement. No idea why Python works this way, but then again, I feel that way a lot toward Python. This needs to be fixed in the Catkin plugin to only append the current PYTHONPATH if it's actually set.
Changed in snapcraft: | |
status: | New → In Progress |
assignee: | nobody → Kyle Fazzari (kyrofa) |
importance: | Undecided → High |
Changed in snapcraft: | |
milestone: | none → 2.35 |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix is here: https:/ /github. com/snapcore/ snapcraft/ pull/1522