← Back to issue list

{catkin,python} plugin: support cleaning

View original Github issue

Metadata

Project
snapcraft
Number
#2171
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged as a54a7a4a3, fixing LP #1778716 by deferring Python lookup so Pip can clean Catkin and Python plugin packages after Python is removed.

Resolution: closed resolved

Reason: PR #2171 was approved and merged as commit a54a7a4a3. It changed Pip to locate Python only when needed, allowing cleaning to complete without the removed interpreter.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [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`? ----- Both the Catkin and Python plugins utilize the Pip class in order to clean their pull steps (specifically, they tell the Pip class to clean its packages). However, when cleaning the pull step, Python has already been removed from the installdir, which means the Pip class cannot be instantiated, causing an error about being unable to find Python. It's reasonable to ask Pip to clean any fetched packages, and doing so doesn't require Python. This PR fixes LP: [#1778716](https://bugs.launchpad.net/snapcraft/+bug/1778716) by lazily looking for Python only when it's required instead of upon class instantiation.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as a54a7a4a3, fixing LP #1778716 by deferring Python lookup so Pip can clean Catkin and Python plugin packages after Python is removed.
stealth/space-bunny-alpha — closed resolved Merged into master as commit a54a7a4a3 (#2171), enabling Catkin and Python plugin cleanup by deferring Pip's Python lookup until needed.
qwen/qwen3.6-35b-a3b — — Merged into master. Fixes LP #1778716 by deferring Python lookup in the Pip class until cleanup. Resolves a crash in Catkin and Python plugins when cleaning the pull step after Python is removed from the installdir.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. Resolves catkin and python plugin cleanup failures by deferring Python initialization in the Pip class until actually required. This lazy loading prevents instantiation errors after Python is removed from the installdir, fixing Launchpad bug #1778716.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#882 Python plugin: remove pip packages when cleaning pull. snapcraft merged Merged PR #882 as commit c54dea99d, making Python plugin clean_pull remove <partdir>/packages and fixing LP #1630005.
72%