catkin plugin: only append PYTHONPATH if set
Metadata
Current evaluation
Merged in commit a2440c986: the Catkin plugin now appends PYTHONPATH only when set, preventing empty path segments; environment-output coverage was added.
Resolution: closed resolved
Reason: PR #1522 was merged as commit a2440c986, fixing LP #1714333 by preserving an existing PYTHONPATH and omitting it entirely when unset.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This PR fixes LP: [#1714333](https://bugs.launchpad.net/snapcraft/+bug/1714333) by only including the original PYTHONPATH if it's actually set. Otherwise, Python interprets empty PYTHONPATH segments as the current working directory, which in the case of the Catkin plugin is not desired.
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in commit a2440c986: the Catkin plugin now appends PYTHONPATH only when set, preventing empty path segments; environment-output coverage was added. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#1522 via commit a2440c986, fixing LP #1714333 by appending Catkin's PYTHONPATH only when set and adding an environment regression test. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for the catkin plugin that conditionally appends PYTHONPATH only when set, preventing Python from treating empty segments as the current working directory. Adds an integration test verifying no empty path segments remain. Resolves Launchpad bug #1714333. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1714333 Catkin plugin: empty segment added to PYTHONPATH | snapcraft (launchpad) | closed | Fixed by snapcraft PR #1522, merged as commit a2440c986 ("catkin plugin: only append PYTHONPATH if set"), which makes the Catkin plugin append the existing PYTHONPATH only when it is set, avoiding an empty path segment. | |
| #324 catkin plugin: do not overwrite the PYTHONPATH | snapcraft | merged | Merged PR #324 fixed the catkin plugin to preserve setup.sh’s PYTHONPATH instead of overwriting it, resolving LP #1544790. | |
| #1354 catkin plugin: fix pythonpath for catkin_find | snapcraft | closed | Closed unmerged after inactivity; its linked catkin-underlay failure was later fixed by merged PR #1526 in commit ae9fd598f. |