← Back to issue list

Clean for parts and removal of duped code for lifecycle and the BasePlugin

View original Github issue

Metadata

Project
snapcraft
Number
#88
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in snapcraft#88 (272c2d6e8), adding per-part cleanup and consolidating lifecycle/BasePlugin directory ownership to remove duplicated code.

Resolution: closed resolved

Reason: Pull request #88 was merged as commit 272c2d6e8, with implementation commit 0491979fa. It enables individual part cleanup, moves directory handling into the plugin handler or lifecycle, and removes duplicate logic.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Parts can now be individually cleaned up, involved moving some of the logic to the plugin handler in the lifecycle itself. Define things in one place only and expose them accordingly. sourcedir, builddir and installdir are handled in the plugin while stagedir, snapdir, ubuntudir and the state file by the lifecycle. Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#88 (272c2d6e8), adding per-part cleanup and consolidating lifecycle/BasePlugin directory ownership to remove duplicated code.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#88 (272c2d6e8), enabling per-part cleanup and consolidating lifecycle/BasePlugin directory handling to remove duplicated code.
qwen/qwen3.6-35b-a3b — — Merged. Refactored build parts cleanup and removed duplicated lifecycle and BasePlugin code. Centralized logic, splitting directory handling between plugins and lifecycle. Approved, 165 additions and 54 deletions across 7 files.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Refactored part cleanup by consolidating duplicated code into the lifecycle and plugin handler. Centralized directory and state management: plugins handle sourcedir, builddir, and installdir, while lifecycle manages stagedir, snapdir, ubuntudir, and state files. Approved with minor nits.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#404 Clean: Leave local plugins alone. snapcraft merged Merged PR #404 via b399a5ebd (fix commit 5094d08b2), preserving local plugins during clean and adding regression tests for LP #1561546; released in Snapcraft 2.6.1.
72%
#1796980 Remove cleanbuild snapcraft (launchpad) closed Merged snapcore/snapcraft#2335 as 27ec9ba63, removing LXD lifecycle builds for base-based snaps and making cleanbuild redundant for them.
72%