lifecycle: use in-snap mksquashfs if running from snap
Metadata
Current evaluation
PR #1891 merged (commit f3d870e4e) so lifecycle uses the mksquashfs bundled inside the snapcraft snap when running as a snap, instead of relying on $PATH. Later replaced by `snap pack` in #3173.
Resolution: closed resolved
Reason: The PR was merged into snapcraft as commit f3d870e4e, which made snapcraft/_lifecycle.py resolve mksquashfs to the in-snap binary when SNAPCRAFT is running from a snap, fixing the classic-snap case with no PATH set. Years later commit 63bc74cba (#3173) removed mksquashfs usage entirely in favour of `snap pack`, but that does not negate the fix.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | PR #1891 merged (commit f3d870e4e) so lifecycle uses the mksquashfs bundled inside the snapcraft snap when running as a snap, instead of relying on $PATH. Later replaced by `snap pack` in #3173. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR canonical/snapcraft#1891 makes lifecycle use Snapcraft's bundled mksquashfs when running from a snap, avoiding reliance on the build host's PATH. | |
| 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. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/snapcraft#3173
(confidence 80%)
Commit 63bc74cba 'cli: use snap pack instead of mksquashfs' later removed the mksquashfs invocation (including the in-snap lookup) from snapcraft; no mksquashfs references remain in the tree at HEAD.
-
Related To:
canonical/snapcraft#2895
(confidence 45%)
Follow-up commit d76f73481 adds a detailed error when mksquashfs fails, building on the same code path touched by this PR.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3173 cli: use snap pack instead of mksquashfs | snapcraft | merged | Merged in snapcore/snapcraft#3173 (63bc74cba), replacing direct mksquashfs packaging with snap pack and removing the obsolete skeleton-check flow. | |
| #1805 lifecycle: use the -no-fragments mksquashfs option | snapcraft | merged | Merged in #1805 (commit 9a131cb5b), adding mksquashfs -no-fragments so snap composition is predictable and review tools can validate snaps. | |
| #1663396 Lifecycle's test_core_snap environment gets corrupted by something earlier in the suite | snapcraft (launchpad) | closed | Fixed by merged PR canonical/snapcraft#1133 (commit c0b0f9752), eliminating a test's PATH/environment-variable leak that prevented mksquashfs from being found. | |
| #3137 lifecycle: use snap from path to --check-skeleton | snapcraft | merged | Merged PR #3137 in commit 2515447f5, changing lifecycle skeleton checks to invoke the host snap command with --check-skeleton. |