lifecycle: use in-snap mksquashfs if running from snap
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Currently, Snapcraft just runs `mksquashfs`, relying on the $PATH. However, as a classic snap, Snapcraft sets no PATH. As a result, even when running as a snap, Snapcraft relies on `mksquashfs` being installed on the build system.
Start using the one in the snap in this case.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix to use the snap-bundled mksquashfs instead of relying on the system PATH when running as a snap. This ensures the classic snap executes correctly without requiring external system tools. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updated lifecycle to use the snap-bundled mksquashfs binary instead of relying on the system PATH when running as a snap, removing the external mksquashfs dependency during execution. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1805 lifecycle: use the -no-fragments mksquashfs option | snapcraft | merged | Merged PR disabling Squashfs fragments in mksquashfs via the -no-fragments flag. This prevents unpredictable snap composition from threaded compression, enabling reliable validation. Approved and passed CI checks. | |
| #3173 cli: use snap pack instead of mksquashfs | snapcraft | merged | Merged. Replaced mksquashfs with snap pack, aligning with snapd standards and removing the --check-skeleton flag. Code refactored into snapcraft.cli. Windows support deferred to multipass. Approved and merged after passing CI. | |
| #3137 lifecycle: use snap from path to --check-skeleton | snapcraft | merged | Merged a change to replace the --check-skeleton flag with the host snap command for lifecycle operations, following the snapd team recommendation. Approved by one reviewer, modifying one file with 15 additions and 21 deletions. | |
| #2895 lifecycle: raise detailed error if mksquashfs fails | snapcraft | merged | 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. |