Properly support `--shell`, `--shell-after` and `--debug` on `pack`
Metadata
Current evaluation
Fixed by merged PR #436 (ab55ec81), adding --shell and --shell-after to pack and applying --debug when packing fails.
Resolution: closed resolved
Reason: PR canonical/craft-application#436 was merged as commit ab55ec81 and explicitly resolves #430 by supporting all three options during the packing process.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Update the [PackCommand](https://github.com/canonical/craft-application/blob/main/craft_application/commands/lifecycle.py#L361) so that `--shell`, `--shell-after` and `--debug` work as the user expects them to for the packing process itself (and not just for the lifecycle commands that might come before it).
### Why it needs to get done
There is a real user need for the options on `pack`, specially `--debug` as the packing process is involved enough to fail sometimes.
Also the inconsistency is annoying, heh
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #436 (ab55ec81), adding --shell and --shell-after to pack and applying --debug when packing fails. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged craft-application#436 (ab55ec81), adding --shell and --shell-after to pack and applying --debug when packing fails. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a GitHub resolution. Synced to internal Jira ticket CRAFT-3288. No pull requests were merged, indicating the request was abandoned or handled via internal tracking. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The request to add shell and debug flags to the pack command was synced to an internal Jira ticket, but no code changes or pull requests were merged. The issue appears abandoned. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#436
(confidence 100%)
Merged implementation for pack shell handling and debug output.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #419 Support `--shell` and `--shell-after` for the `pack` command | craft-application | closed | Added --shell and --shell-after support to pack via merged PR #436 (commit ab55ec81); #419 was closed as a duplicate of #430, which the PR also fixed. | |
| #436 feat: support shell/shell-after and debug in 'pack' | craft-application | merged | Merged craft-application#436 (commit ab55ec81), adding --shell/--shell-after to pack and making --debug shell into the build environment when packing fails; fixes #430. | |
| #495 pack: add support for --debug, --shell, and --shell-after (CRAFT-408) | charmcraft | merged | Merged in commit 1a957995, adding --debug, --shell, and --shell-after to pack for interactive and failure-triggered build debugging. | |
| #415 `--debug` does not enter a shell for failures during post-prime or packing | craft-application | closed | Fixed by merged PR #436 (commit ab55ec81), adding --shell/--shell-after to pack and making --debug drop into a shell when packing fails; closed by maintainer tigarmo on 2024-09-10. | |
| #58 Implement "--shell", "--shell-after" and "--debug" | craft-application | closed | Implemented --shell, --shell-after and --debug support through merged PR #436 (commit ab55ec81). | |
| #1074 --shell and --debug fail cryptically with late pack failures | craft-application | closed | Fixed in merged PR #1073 (commit 38fdb686), which added post-prime failure handling so --debug can open a shell instead of only reporting an instance error. | |
| #650 The `--shell` action for `pack` is broken | charmcraft | closed | Reporter facundobatista found `pack --shell` broken after output moved to the Emitter; fixed by PR #740 (branch pause-emitter-when-asking-for-input, merge commit e70ed86f), merged2022-04-28. | |
| #81 feat: implement --shell, shell-after, --debug | craft-application | merged | Merged PR #81 as commit acad93da, adding --shell, --shell-after and --debug support and resolving #58 after approval by two maintainers. | |
| #4963 Support `--shell` and `--shell-after` for `snapcraft pack` | snapcraft | closed | Restored --shell and --shell-after for snapcraft pack via merged craft-application#436 (ab55ec81); the fix shipped in Snapcraft 8.4.1. |