feat(organize): support build pseudo-partition source
Metadata
Current evaluation
Merged #1598 via commit cc02958b, adding source-only (build) organize support so build artifacts can be copied into install partitions without being removed.
Resolution: closed resolved
Reason: PR #1598 was merged as commit cc02958b. It adds (build) as an organize source, rejects it as a destination, and reserves build as a pseudo-partition name.
Evaluated by: mr-cal-bot
No scores available.
Issue body
## Summary
Add support for using `(build)` as an `organize` source pseudo-partition.
This allows files generated in the part build directory to be copied into install partitions during build organization, without moving/removing the original build artifacts.
The change keeps `(build)` source-only:
- `(build)` is accepted as an `organize` source
- `(build)` is rejected as an `organize` destination
- `build` is reserved and cannot be used as a real partition name
- `part_install_dirs` is not globally polluted with `build`; the build directory is only injected into the organize call path
## Tests
- `git diff --check`
- `uv run --group lint --group types ruff check ...`
- `uv run --group lint --group types ruff format --check ...`
- `uv run --group dev python -m pytest -q tests/integration/features/partitions/lifecycle/test_lifecycle.py::test_organize_from_build_with_partitions -rs`
- `uv run --group dev python -m pytest -q tests/unit/executor/test_organize.py tests/unit/features/partitions/executor/test_organize.py tests/unit/features/overlay_partitions/test_executor_organize.py tests/unit/executor/test_part_handler.py tests/unit/features/partitions/executor/test_part_handler.py tests/unit/features/partitions/test_parts.py tests/unit/features/overlay_partitions/test_parts.py tests/unit/test_infos.py tests/unit/utils/test_partition_utils.py -rs`
Final targeted result: `1107 passed, 1 xfailed`.
---
CRAFT-5181
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #1598 via commit cc02958b, adding source-only (build) organize support so build artifacts can be copied into install partitions without being removed. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1598 (commit cc02958b), adding (build) as a source-only organize pseudo-partition so files in the part build directory can be copied into install partitions without moving the originals. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged PR adding (build) as a source-only pseudo-partition for organize. Enables copying build artifacts to install partitions without moving originals. Approved by two reviewers, passed tests, and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds build as a source-only pseudo-partition for organize, enabling file copying from build to install partitions without moving artifacts. Refactored path resolution, reserved the build name, and added tests. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1535 feat: organize files from build | craft-parts | merged | Merged as 8e4daf5 adding (build)-partition organize support and trailing-slash destination handling for #1521; reverted by #1548 (56282732) after a Snapcraft regression, then re-landed as #1598. | |
| #1592 Refactor and integrate organize from build | craft-parts | closed | Reintroduced organize-from-build in merged PR #1598 (commit cc02958b), with (build) as a source partition whose files are copied rather than moved. | |
| #1521 Organize files from build | craft-parts | closed | Support for copying build-directory files into install partitions landed in #1598 (cc02958b), after #1535 was reverted by #1548 and the feature was re-landed. |