feat: support 'pack' command
Metadata
Current evaluation
Merged to add version-aware support for the snapcraft pack command, addressing Snapcraft 8 deprecation and Snapcraft 9 breaking changes. Maintainer merged despite unrelated CI infrastructure failures on ppc64el and s390x.
Suggested action: —
No scores available.
Issue body
Snapcraft 8 deprecated calling `snapcraft` in favor of `snapcraft pack`. Snapcraft 9 will raise an error when calling just `snapcraft`.
Older versions of snapcraft don't fully support `snapcraft pack`, so this PR calls `snapcraft` for older snapcraft versions and `snapcraft pack` for everything else.
Similar to https://github.com/canonical/action-build/pull/91
Fixes #53
(SNAPCRAFT-5028)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged to add version-aware support for the snapcraft pack command, addressing Snapcraft 8 deprecation and Snapcraft 9 breaking changes. Maintainer merged despite unrelated CI infrastructure failures on ppc64el and s390x. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to conditionally invoke snapcraft pack for newer Snapcraft versions and snapcraft for older ones, addressing deprecation. Maintainer merged despite unrelated CI failures on ppc64el and s390x. Resolves #53. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4794 feat: allow packing a directory | snapcraft | merged | Merged to restore snapcraft pack directory functionality after a snapcraft 8.2 regression. Approved by two reviewers, passed CI, and resolved issue #4769. | |
| #5616 feat(snapcraft_legacy): pack command runs the lifecycle | snapcraft | merged | Merged squashed PR that aligns the core20 snapcraft pack command with core22 and core24 by running the lifecycle. Approved by three reviewers with all CI checks passing. Resolves #5425. | |
| #8 feat: support build-packages | snapcraft-rocks | merged | Merged a feature adding a wrapper script to run apt update before Snapcraft, resolving an empty Apt cache issue in the base Ubuntu image. Approved by reviewers and rebased to pass tests before merge. | |
| #100 feat(snapcraft/pack): node-based rewrite | craft-actions | merged | Merged a node-based rewrite of the snapcraft/pack action. Resolves the Snapcraft 7 default command issue, adds .comp file support, and includes unit tests. Approved by two reviewers with all CI checks passing across multiple platforms. |