python v2 plugin: fix multiple python parts with staged python
Metadata
Current evaluation
Merged via commit 932288fed, fixing Python v2 plugin file conflicts and broken symlinks when multiple parts staged Python packages by resolving interpreters before venv creation.
Resolution: closed resolved
Reason: PR #3451 was merged as commit 932288fed. It resolves interpreter paths before creating virtualenvs, preventing duplicate Python symlinks and file conflicts across staged parts.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Fix a regression where snaps with multiple python parts and staged
python packages may cause a file conflict & broken (unused) symlink.
When creating a venv with "/usr/bin/python3", the venv will populate
symlinks for:
/bin/python
/bin/python3
When creating a venv with "/usr/bin/python3.8", the venv will populate
symlinks for:
/bin/python
/bin/python3
/bin/python3.8
By resolving the interpreter prior to using it, the venvs were getting
an additional symlink which are not being fixed up like "python3",
or $SNAPCRAFT_PYTHON_INTERPRETER.
Should SNAPCRAFT_PYTHON_INTERPRETER be set to a more specific minor
version, either the snap must filter out the additional symlink or the
plugin needs to be updated to correct, or remove, the problematic
links.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged via commit 932288fed, fixing Python v2 plugin file conflicts and broken symlinks when multiple parts staged Python packages by resolving interpreters before venv creation. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #3451 (commit 932288fed), fixing Python v2 plugin file conflicts and broken symlinks with multiple staged Python parts by resolving interpreters before venv creation. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for Python v2 plugin regression causing file conflicts and broken symlinks with multiple staged Python parts. The update resolves the interpreter before virtual environment creation to prevent unmanaged symlinks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for a regression causing file conflicts and broken symlinks when multiple Python parts use staged packages. Resolved the interpreter before venv creation to prevent unmanaged symlinks. Merged into master as PR #3451. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3320 python v2 plugin: consistent linking for interpreter | snapcraft | merged | Merged as d1d8a9414, fixing Python v2 venv interpreter linking by resolving interpreters before creation and relativizing staged interpreter symlinks. | |
| #6411 The Python plugin can create conflicting interpreters | snapcraft | closed | Closed as fixed by merged PR #6437 (commit 35853fff8): the Python plugin now rewrites shebangs on core26+ to the absolute /snap/<name>/bin/python3 path, removing PATH-order ambiguity with staged /usr/bin/python3. |