← Back to issue list

Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core20 snap

View original Github issue

Metadata

Project
snapcraft
Number
#5316
Type
issue
State
closed
Author
lengau
Labels
Type: Bug Status: Needs information
Created
Updated
Closed

Current evaluation

Snapcraft stopped setting the removed snapd option in #5689 (8f02d3d48), fixing core20 builds in Snapcraft 8.12.

Resolution: closed resolved

Reason: Snapd 2.68.4 removed core.experimental.snapd-snap, but Snapcraft continued setting it. PR #5689 removed the obsolete setting, and the maintainer confirmed the core20 fix shipped in Snapcraft 8.12.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description When building a core18 snap, the second run errors out. It works for a single build again after cleaning ### To Reproduce 1. Clone a core18 snap 2. `snapcraft --use-lxd` 3. `snapcraft --use-lxd` ### Environment Kubuntu 25.04 ### snapcraft.yaml ```yaml name: git-nuke base: core18 version: '0.1' summary: The best thing since sliced bread description: | Too many branches? NOT ANY MORE! grade: devel # must be 'stable' to release into candidate/stable channels confinement: classic # use 'strict' once you have the right plugs and slots parts: my-part: plugin: dump source: . apps: git-nuke: command: /snap/core18/current/usr/bin/python3 $SNAP/git-nuke ``` ### Relevant log output ```shell $ snapcraft_7 --use-lxd Launching a container. Waiting for container to be ready Waiting for network to be ready... error: cannot perform the following tasks: - Run configure hook of "core" snap (run hook "configure": cannot set "core.experimental.snapd-snap": unsupported system option) An error occurred when trying to execute 'snap set system experimental.snapd-snap=true' with 'LXD': returned exit code 1. ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Snapcraft stopped setting the removed snapd option in #5689 (8f02d3d48), fixing core20 builds in Snapcraft 8.12.
stealth/space-bunny-alpha — closed resolved Removed the obsolete snapd-snap setting in #5689 (8f02d3d48), fixing core20 builds in Snapcraft 8.12; the core18/Snapcraft 7 variant was backported by #5694 in 7.5.9.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #5689 (8f02d3d48), which removed the obsolete snapd-snap setting. Released in Snapcraft 8.12; backported by PR #5694 for 7.5.9.
qwen/qwen3.6-35b-a3b — — Fixed in Snapcraft 8.12. The failure resulted from snapd 2.68.4 removing the core.experimental.snapd-snap flag. Snapcraft now conditionally applies the flag based on the snapd version, resolving the build error for core20 and core18 environments.
qwen/qwen3.6-35b-a3b — — Fixed in Snapcraft 8.12. Snapd 2.68.4 removed the core.experimental.snapd-snap option, causing build failures. Snapcraft now conditionally sets the flag based on the snapd version, resolving the issue for core20 and core18 builds.
qwen3.6-35b-a3b-mtp-q6 — — Fixed in Snapcraft 8.12. The build now conditionally sets the core.experimental.snapd-snap flag only when snapd is below version 2.68.4, resolving the unsupported system option error.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5689 (confidence 99%)

    Merged as commit 8f02d3d48, removing the unnecessary snapd_snap flag.

  • Related To: canonical/snapcraft#5693 (confidence 99%)

    Core18 and Snapcraft 7 counterpart; fixed by backport #5694 in Snapcraft 7.5.9.

  • Related To: canonical/snapcraft#5694 (confidence 98%)

    Backport removing the obsolete setting for Snapcraft 7.

Related issues

Issue Project State Summary Similarity
#5693 Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core18 snap snapcraft closed Fixed by merged backport PR #5694 (cb5283b6a), which removed the obsolete snapd-snap setting; released in Snapcraft 7.5.9.
89%
#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.
74%
#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.
73%
#5694 fix(backport): remove unnecessary snapd_snap flag (#5689) snapcraft merged Merged backport #5694 (cb5283b6a) removed obsolete snapd_snap handling for Snapcraft 7.5, fixing core20 repacking failure #5316; original fix was #5689.
70%