← Back to issue list

Catkin plugin: empty segment added to PYTHONPATH

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1714333
Type
issue
State
closed
Author
~kyrofa
Labels
Created
Updated
Closed

Current evaluation

The Catkin plugin incorrectly added an empty PYTHONPATH segment when unset, breaking snap confinement. Closed without comments or a tracked fix, likely abandoned or resolved in a later release.

Suggested action:

No scores available.

Issue body

The Catkin plugin puts something along the following lines into the environment: export PYTHONPATH=foo:$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.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b The Catkin plugin incorrectly added an empty PYTHONPATH segment when unset, breaking snap confinement. Closed without comments or a tracked fix, likely abandoned or resolved in a later release.
qwen/qwen3.6-35b-a3b Abandoned. The Catkin plugin incorrectly appends an empty PYTHONPATH segment when unset, adding the current directory and breaking snap confinement. The issue was closed without a fix or pull request.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1522 catkin plugin: only append PYTHONPATH if set snapcraft merged Merged fix for the Catkin plugin that only appends PYTHONPATH when set, preventing empty segments from resolving to the current directory. Added an environment test to verify the fix. Approved and merged.
73%
#1354 catkin plugin: fix pythonpath for catkin_find snapcraft closed Closed and abandoned. The author clarified the fix only resolved a highly specific local setup issue and was no longer relevant. The underlying problem persisted, prompting further troubleshooting on the forum instead of merging the changes.
70%