parts: check for out of source builds
Metadata
Current evaluation
Merged fix for out-of-source builds with the source-subdir parameter. Added missing out-of-source checks and corrected source directory selection for cmake and meson plugins. Approved, passed CI, and merged with 221 additions and 24 deletions across 22 files.
Suggested action: —
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Plugins that supported out-of-source building were not working with the source-subdir parameter.
There were two minor issues:
1. A missing check for out-of-source plugins when determining the build directory
2. `cmake` and `meson` plugins not choosing the right source directory
Unfortunately, accessing the out_of_source_build property prior to instantiating the plugin was a challenge. I've made some comments below.
(CRAFT-1185)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for out-of-source builds with the source-subdir parameter. Added missing out-of-source checks and corrected source directory selection for cmake and meson plugins. Approved, passed CI, and merged with 221 additions and 24 deletions across 22 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for out-of-source plugin builds. Added missing build directory validation and corrected cmake and meson plugins to select the correct source directory, resolving CRAFT-1185. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #248 fix: parts: check for out of source builds | craft-parts | closed | Merged to fix out-of-source build detection in cmake and meson plugins, resolving source directory selection issues with the source-subdir parameter. Addresses CRAFT-1185. | |
| #3392 plugins v2: add support for out of source tree builds | snapcraft | merged | Merged. Introduces an out_of_source_build property to PluginV2, disabling automatic source copying. Applied to meson and cmake plugins, adjusted for consistency per review, and merged with 100% diff coverage. | |
| #3154 cmake v2 plugin: take source-subdir into account | snapcraft | merged | Merged. Updates cmake v2 plugin to use SNAPCRAFT_PART_SOURCE_WORK instead of SNAPCRAFT_PART_SOURCE for pull and build steps, fixing source subdirectory handling. Approved, passed CI, and modified 10 files (+55/-7). |