← Back to issue list

snapcraft init creates boilerplate which opaquely fails to build by default

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1990550
Type
issue
State
closed
Author
~dilyn-corner
Labels
craft-1670
Created
Updated
Closed

Current evaluation

Resolved by changing `snapcraft init` boilerplate from core20 to core22; the reporter confirmed the fix on 2023-06-01.

Resolution: closed resolved

Reason: The mismatched core20 boilerplate was updated to core22. The reporter explicitly confirmed, "This was resolved, thank you!"

Evaluated by: mr-cal-bot

No scores available.

Issue body

In a similar vein to https://bugs.launchpad.net/snapcraft/+bug/1990549 Using snapcraft 7's snapcraft init to create a boilerplate snapcraft.yaml defaults to a base of core20. However, snapcraft 7 will use the flags and behaviors of snapcraft 6 for snaps with a base of core20. This means that snapcraft --help displays options which are incongruent to what is actually available when building the snap, and no useful or informative warning is given as to why particular options fail. Because snapcraft's behavior changes depending on the base for the snap, snapcraft 7 should create a base: core22 boilerplate yaml. This would align default behavior with expected options.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved by changing `snapcraft init` boilerplate from core20 to core22; the reporter confirmed the fix on 2023-06-01.
stealth/space-bunny-alpha — closed resolved Snapcraft init now generates core22 boilerplate instead of core20 via canonical/snapcraft#4118 (commit 4afc9e4c9).
stealth/space-bunny-alpha — closed resolved Updated snapcraft init to generate core22 instead of core20. Merged in canonical/snapcraft#4118 via commit 4afc9e4c9.
qwen/qwen3.6-35b-a3b — — Changing snapcraft init default base to core22 was closed without implementation. Zero comments indicate the request was abandoned due to inactivity.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report recommended updating snapcraft init to default to core22 instead of core20, preventing opaque build failures and CLI mismatches. No fix or pull request was submitted, leaving the request abandoned.
qwen/qwen3.6-35b-a3b — — Closed and implemented. The default base for snapcraft init was updated from core20 to core22, aligning build behavior with snapcraft 7 and resolving opaque build failures.
qwen3.6-35b-a3b-mtp-q6 — — Closed without comments or resolution details. The proposal to change snapcraft init's default base from core20 to core22 was abandoned, with no fix or merge documented.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft (launchpad)#1990550 (confidence 85%)

    The issue identified the core20 boilerplate and the reporter confirmed its correction; no separate PR or commit was found.

Related issues

Issue Project State Summary Similarity
#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).
78%
#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.
75%
#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.
74%
#4118 init: use core22 base for `snapcraft init` snapcraft merged Merged PR #4118 (mr-cal, CRAFT-1670): snapcraft init now scaffolds core22 as the default base instead of core20, with the command moved from snapcraft_legacy/ to snapcraft/ and a spread test added. Squash-merged as 4afc9e4c9.
73%
#1575581 "snapcraft init" doesn't generate a valid template snapcraft (launchpad) closed Fixed by PR ubuntu-core/snapcraft#528 and released in Snapcraft 2.10 for Xenial; verification confirmed `snapcraft init` followed by `snapcraft` produced a valid snap.
72%
#5003 Building snap with `core20` failed with non-informative error message snapcraft open The misleading core20 snapcraft-pack error was fixed by merged PR #5616 (commit b511004af), which ran the lifecycle for legacy core20 snaps.
72%
#2099923 Snapcraft builds are failing: install of snap "snapcraft" failed snapcraft (launchpad) open Reported Launchpad Bionic non-i386 builds cannot install Snapcraft 7.x/stable because core20 needs snapd 2.61; the issue remains open, untriaged, and unanswered.
71%
#3583 build providers: snapcraft's new base is core20 (CRAFT-544) snapcraft merged Merged PR #3583 via 2b2d7dbcf, replacing build providers' injected core18 base with core20 to match Snapcraft's new base.
70%
#1980686 snapcraft build won't allow `verbose` flag snapcraft (launchpad) closed Snapcraft 7.0.11 fixed core22 only; canonical/snapcraft#4024 (be005b98d) later forwarded -v and --verbose to snapcraft_legacy for core18/core20 builds.
70%
#2012074 snapcraft cannot build snap by default on aarch64 snapcraft (launchpad) open ARM64 default builds failed on Snapcraft 7.3.1 because core20 selected amd64-only Multipass images; later defaults use core22/LXD on Linux, addressing the reported path.
70%