lifecycle: raise detailed error if mksquashfs fails
Metadata
Current evaluation
Merged improvements to error handling when mksquashfs fails. Command output is now included in the raised RuntimeError instead of only logging, aiding debugging of frequent Sentry reports. Approved and passed CI checks.
Suggested action: —
No scores available.
Issue body
Sentry is full of bug reports related to RuntimeError for failing
to execute mksquashfs. However, there is no clue as to the failure,
because snapcraft just prints it to logger. Instead of logging the
error, include the output as part of the raised RuntimeError.
If we can get a better idea of the nature of the failures, we can
further refine handling here.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged improvements to error handling when mksquashfs fails. Command output is now included in the raised RuntimeError instead of only logging, aiding debugging of frequent Sentry reports. Approved and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes improving mksquashfs failure handling by embedding command output in the raised RuntimeError instead of only logging it, enabling faster debugging of reported issues. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Improves error handling for mksquashfs failures by including command output in the raised RuntimeError instead of just logging it, enabling better debugging of recurring Sentry reports. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1481 cli: better error message for missing mksquashfs | snapcraft | merged | Merged update improves the CLI error message when mksquashfs is missing. Approved by one reviewer, the change modifies four files to provide clearer feedback. The author plans to add OS-specific installation guidance in a future update. | |
| #1891 lifecycle: use in-snap mksquashfs if running from snap | snapcraft | merged | Merged lifecycle changes to use the snap-bundled mksquashfs binary instead of relying on the system PATH when running as a snap. Approved by reviewer and passed CI checks. |