Present a better error when missing critical build-slices
Metadata
Current evaluation
Fixed in #1767 by adding validation that parts using build-slices must include base-files_bin and bash_bins, replacing the opaque chroot error with a clear message.
Resolution: closed resolved
Reason: Issue #1744 was resolved by merged PR #1767 (commit 4823e607), which added validation to check that parts declaring build-slices include the required base-files_bin and bash_bins slices, providing a user-friendly error instead of the opaque chroot failure.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Present a user-friendly error if build-slices are defined but `base-files_bin` and `bash_bins` aren't listed.
### Why it needs to get done
If a part uses build-slices, then craft-parts itself needs `base-files_bin` and ` bash_bins` to run it's build script.
However, if a user forgoes these, they get the error:
```bash
> testcraft.witchcraft pack
Overlay environment execution error: [Errno 2] No such file or directory: PosixPath('/root/parts/craft/build-slices/run/build.sh')
Failed to run witchcraft in instance
```
source: https://github.com/canonical/craft-application/pull/1188#discussion_r4096810621
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed in #1767 by adding validation that parts using build-slices must include base-files_bin and bash_bins, replacing the opaque chroot error with a clear message. | |
| stealth/space-bunny-alpha |
Impact:
40
Quick Win:
23
Complexity:
30
Confidence:
88
Actionability:
82
|
keep open | Enhancement: raise a clear error when build-slices are declared without base-files_bin and bash_bins, instead of the opaque missing build.sh chroot failure. Triaged, tracked as CRAFT-5330; not yet implemented in _cut_build_slices. | |
| stealth/space-bunny-alpha |
Impact:
35
Quick Win:
21
Complexity:
25
Confidence:
92
Actionability:
80
|
keep open | Improve build-slices validation: parts using build-slices currently fail with an opaque missing build.sh error when base-files_bin and bash_bins are absent. | |
| stealth/space-bunny-alpha |
Impact:
36
Quick Win:
22
Complexity:
29
Confidence:
93
Actionability:
86
|
needs triage | New request to validate that build-slices includes base-files_bin and bash_bins, replacing the later missing run.sh error; no triage or proposed fix is recorded. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated | |
| created |
Related work
-
Likely Fixed By:
craft-parts#1767
(confidence 95%)
PR #1767 adds validation for required build-slices (base-files_bin and bash_bins) as requested in issue #1744.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1767 feat: validate required build-slices | craft-parts | merged | Merged PR #1767 adding validation for required build-slices to improve error messages, resolving #1744. |