Building snap with `core20` failed with non-informative error message
Metadata
Current evaluation
The misleading core20 snapcraft-pack error was fixed by merged PR #5616 (commit b511004af), which ran the lifecycle for legacy core20 snaps.
Suggested action: close resolved
Reason: Closed issue #5425 identifies merged PR #5616 and commit b511004af as the implementation, and PR #5616 is confirmed merged. The related #5426 also records that core20 legacy pack behavior was addressed for Snapcraft 8.11.
Evaluated by: mr-cal-bot
Impact:
55
Quick Win:
39
Complexity:
25
Confidence:
98
Actionability:
95
Issue body
### Bug Description
When packing a snap with `core20` using `snapcraft pack`, the error message is not informative.
### To Reproduce
Use the simple `snap/snapcraft.yaml`
```yaml
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
```
and run `snapcraft pack`
### Environment
```
Name Version Rev Tracking Publisher Notes
lxd 6.1-efad198 29943 latest/stable canonical✓ -
snapcraft 8.3.2 12378 latest/stable/… canonical✓ classic
```
### snapcraft.yaml
```shell
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
```
### Relevant log output
```shell
snapcraft pack
Usage: snapcraft pack [OPTIONS] DIRECTORY
Try 'snapcraft pack -h' for help.
Error: Missing argument 'DIRECTORY'.
```
### Additional context
Switching to `core22` worked
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
55
Quick Win:
39
Complexity:
25
Confidence:
98
Actionability:
95
|
close resolved | The misleading core20 snapcraft-pack error was fixed by merged PR #5616 (commit b511004af), which ran the lifecycle for legacy core20 snaps. | |
| qwen/qwen3.6-35b-a3b |
Impact:
40
Quick Win:
22
Complexity:
30
Confidence:
90
Actionability:
80
|
close resolved | snapcraft pack fails with unhelpful error on core20 base; fixed in Snapcraft 8.11 via PR #5425. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
28
Staleness:
55
Complexity:
30
Confidence:
85
Support Request:
10
|
keep open | snapcraft pack with core20 base gives non-informative 'Missing argument DIRECTORY' error. Maintainer confirmed fix via #5425/#5426; current code shows directory arg is now optional (nargs='?') and pack runs lifecycle when omitted. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
20
Complexity:
20
Confidence:
90
Support Request:
10
|
keep open | snapcraft pack with core20 base shows unhelpful Missing argument error. Maintainer confirmed fix is in progress via PRs #5425 and #5426. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
15
Complexity:
20
Confidence:
90
Support Request:
5
|
close stale | snapcraft pack with core20 base shows unhelpful Missing argument DIRECTORY error. Triaged and noted as fixed via PRs #5425 and #5426. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#5425
(confidence 99%)
Closed tracking issue says the core20 legacy pack behavior was implemented by PR #5616.
-
Related To:
snapcraft#5426
(confidence 98%)
Tracks the same legacy pack behavior for core18 and core20; its summary says the Snapcraft 8 fix was delivered through #5425.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1866300 snapcraft fails to build core20 snap | snapcraft (launchpad) | closed | Closed without a documented fix after core20 Multipass/LXD failures; core20 build-base support was unavailable and the workaround was destructive mode. | |
| #5425 `snapcraft pack` should run the lifecycle for core20 in Snapcraft 8 | snapcraft | closed | Fixed core20 snapcraft pack behavior in merged PR #5616 (commit b511004af): bare pack now runs the lifecycle, while snapcraft pack <dir> still invokes snap pack. | |
| #1862256 snapcraft should complain loudly when building base: core20 snap on i386 | snapcraft (launchpad) | closed | Closed as superseded: improved architecture parsing rejects unsupported core20/i386 builds, making a dedicated check unnecessary; snapcraft#4392 improved this handling. | |
| #5316 Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core20 snap | snapcraft | closed | Snapcraft stopped setting the removed snapd option in #5689 (8f02d3d48), fixing core20 builds in Snapcraft 8.12. | |
| #2009520 core18/20: inconsistent architecture parsing | snapcraft (launchpad) | closed | Superseded by snapcore/snapcraft#4340 and #4341. Core22+ overlapping build-on handling merged in #3821 (4876b53); core20 support was declined. | |
| #1976221 Missing linker base while building with core22 base | snapcraft (launchpad) | closed | Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded. | |
| #5790 fix: resolve core20 architecture shorthand multi-snap naming issue | snapcraft | closed | External PR to fix core20 shorthand architecture producing multi-arch snaps was declined by maintainer (bepri) as better fixed internally; superseded by merged PR #5818 (commit f0a732be3) adding a warning, shipped in 8.13.0. | |
| #1939713 snapcraft init create base: core18 snap | snapcraft (launchpad) | closed | Snapcraft init was updated to scaffold core20 instead of core18 by merged canonical/snapcraft#3587 (merge commit f91632aab). | |
| #4895 fix(remotebuild): require core20 snaps to use the legacy remote builder | snapcraft | merged | Merged in #4895 (d9c8781a1), requiring core20 remote builds to use the legacy builder because the new builder could not parse core20 snapcraft.yaml files; fixes #4886. | |
| #5616 feat(snapcraft_legacy): pack command runs the lifecycle | snapcraft | merged | Merged PR #5616 (commit b511004af) made legacy core20 `snapcraft pack` run the lifecycle like newer bases, fixing issue #5425. |