parts: execute lifecycle from the project dir (CRAFT-505)
Metadata
Current evaluation
Merged in canonical/charmcraft#525 via 0d78f540, running the parts lifecycle from the project directory so relative plugin sources resolve when Charmcraft is launched elsewhere.
Resolution: closed resolved
Reason: PR #525 was merged as commit 0d78f540, implementing CRAFT-505 by changing to the project directory before executing lifecycle steps and restoring the previous directory afterward.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Craft-parts plugins may specify sources as relative paths, and these
are assumed to be relative to the current directory. To allow Charmcraft
to be executed from an arbitrary location on the filesystem, change to
the project directory before executing the parts lifecycle.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/charmcraft#525 via 0d78f540, running the parts lifecycle from the project directory so relative plugin sources resolve when Charmcraft is launched elsewhere. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/charmcraft#525 (0d78f540), running the parts lifecycle from the project directory so relative plugin sources work when Charmcraft is launched elsewhere. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updates the working directory to the project path before running the parts lifecycle, allowing Charmcraft to execute from any location with relative Craft-parts sources. Approved by three reviewers. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a change to execute the parts lifecycle from the project directory. This ensures Craft-parts plugins correctly resolve relative source paths, allowing Charmcraft to run from arbitrary filesystem locations. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #458 build: integrate craft-parts lifecycle (CRAFT-89, CRAFT-367, CRAFT-357) | charmcraft | merged | Merged PR #458 via 9dc20872 (implementation 437dab55), adding a craft-parts lifecycle and charm build plugin to run the charm builder. | |
| #1482 fix: set the correct working directory | charmcraft | closed | Merged PR #1482 corrected the lifecycle working directory, fixing #1475 where parts directories were created inside the project; the fix shipped in Charmcraft 3.1. | |
| #1897 refactor: move parts plugins to their own module | charmcraft | merged | Merged PR #1897 (commit 392f859b), separating craft-parts plugins into charmcraft/parts/plugins and isolating them from other parts functionality. | |
| #1334 refactor(parts): move craft-parts related things into their own package | charmcraft | merged | Merged PR #1334, moving craft-parts code from charmcraft/parts.py into a dedicated package with plugins and lifecycle logic split into separate modules. |