pack: add support for --debug, --shell, and --shell-after (CRAFT-408)
Metadata
Current evaluation
Added --debug, --shell, and --shell-after flags to the pack command for debugging charm builds. Merged after approval by three reviewers and passing CI checks, modifying five files.
Suggested action: —
No scores available.
Issue body
Add flags to support debugging Charm building in target environment.
Execute this shell within the context of managed or destructive mode
to make behavior consistent regardless of provider usage.
--debug will pop a shell on failure in the lifecycle.
--shell will pop a shell instead of building a charm.
--shell will pop a shell after building the charm.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Added --debug, --shell, and --shell-after flags to the pack command for debugging charm builds. Merged after approval by three reviewers and passing CI checks, modifying five files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged: Added --debug, --shell, and --shell-after flags to the pack command. These enable interactive shells for debugging charm builds in target environments, supporting failure, replacement, and post-build execution across managed and destructive modes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged addition of --debug, --shell, and --shell-after flags to pack. These enable debugging Charm builds by spawning shells on failure, instead of building, or post-build, ensuring consistent behavior across modes. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #436 feat: support shell/shell-after and debug in 'pack' | craft-application | merged | Merged following two approvals and passing CI. Introduces --shell and --shell-after flags to the pack command for build environment inspection, and improves --debug to activate on packing failures. Resolves #430. | |
| #772 packing with `--debug` showing building message over shell | charmcraft | closed | Fixed in PR #753 and released in charmcraft 1.7. Debug build messages no longer overwrite the shell prompt during charmcraft pack --debug. The issue is closed. | |
| #4963 Support `--shell` and `--shell-after` for `snapcraft pack` | snapcraft | closed | Added --shell and --shell-after flags to snapcraft pack for debugging. The request was closed after being fixed via upstream craft-application pull request 436. | |
| #418 build/pack: pass --verbose or --quiet as needed (CRAFT-322) | charmcraft | merged | Merged implementation that passes --verbose or --quiet flags to managed build instances, aligning them with the host charmcraft instance. Approved by two reviewers and applied across four files. | |
| #1565 cli: add the pack command | snapcraft | merged | Merged the pack CLI command, replacing the previous assemble implementation. Approved by one reviewer, passed CI checks, and updated seven files with 164 additions and 16 deletions. | |
| #419 Support `--shell` and `--shell-after` for the `pack` command | craft-application | closed | Added support for --shell and --shell-after to the pack command. Fixed via pull request #436 and marked as a duplicate of issue #430. |