regresion: Can't build pc-amd64-gadget-desktop (neither 22 nor 24 versions) with snapcraft 8.x
Metadata
Current evaluation
Fixed by merged PR #4850 (commit 61efc790d); Snapcraft 8.3.0 accepts core22-desktop and core24-desktop bases, restoring gadget builds.
Resolution: closed resolved
Reason: PR #4850 was merged as commit 61efc790d, adding support for core22-desktop and core24-desktop bases. The 8.3.0 changelog explicitly credits #4818 with the core22 regression fix and core24-desktop support.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
I tried to build the `pc-amd64-gadget-desktop` snap (version 22) for core desktop, but snapcraft 8.2.x, but it crashes with an error. Also tried with version 24 and it fails too, but doesn't crash. Instead, snapcraft 7.5.5 works like a charm.
### To Reproduce
- Download the repository from `https://github.com/canonical/pc-amd64-gadget-desktop.git`
- Change to branch `22` (or `24`; it fails in both.
- Run `snapcraft`
### Environment
I'm using LXD under Ubuntu 24.04 LTS.
### snapcraft.yaml
```shell
name: pc-desktop
version: '22-0.4'
type: gadget
build-base: core22
base: core22-desktop
summary: PC gadget for generic devices
description: |
This gadget enables generic pc devices to work with Ubuntu Core Desktop
confinement: strict
grade: stable
architectures:
- build-on: amd64
build-for: amd64
icon: icon.png
package-repositories:
- type: apt
ppa: ucdev/uc-staging-ppa
hooks:
prepare-device:
environment:
# If you are forking and building your own gadget:
# define your model's API key here
# See https://ubuntu.com/core/services/guide/serial-vault-overview
# for instructions on how to generate an API key
# DO NOT check this API key into a publicly accessible VCS
MODEL_APIKEY: ""
# Min version to support shim 15.7
# Using passthrough until LP#2019931 is fixed
passthrough:
assumes:
- snapd2.59.3
parts:
# Temporary workaround until pinning is supported by snapcraft
pin-ucdev:
plugin: nil
override-pull: |
# This is run before the pull step of grub part, so we make sure
# we get the packages from the PPA.
set -x
cat <<'EOF' > /etc/apt/preferences.d/ucdev
Package: *
Pin: release LP-PPA-ucdev-uc-staging-ppa,a=jammy,n=jammy
Pin: origin ppa.launchpad.net
Pin-Priority: 1000
EOF
mbr:
source: .
build-packages:
- ubuntu-dev-tools
plugin: make
grub:
after: [ pin-ucdev ]
plugin: nil
source: .
build-packages:
- ubuntu-dev-tools
- grub-pc-bin
- grub-common
- sbsigntool
stage-packages:
- grub-efi-amd64-signed
- shim-signed
override-build: |
set -x
# Make sure we have signatures from the UC certificates
sbverify --list "$CRAFT_PART_INSTALL"/usr/lib/shim/shimx64.efi.dualsigned |
grep -E 'Canonical Ltd. Secure Boot Signing \(Ubuntu Core'
sbverify --list "$CRAFT_PART_INSTALL"/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed |
grep -E 'Canonical Ltd. Secure Boot Signing \(Ubuntu Core'
# grub.conf lets snapd identify grub as the bootloader on boot
install -m 644 /dev/null "$CRAFT_PART_INSTALL"/grub.conf
organize:
usr/lib/shim/shimx64.efi.dualsigned: shim.efi.signed
usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed: grubx64.efi
prime:
- shim.efi.signed
- grubx64.efi
- grub.conf
extra:
source: ./extra
plugin: dump
```
### Relevant log output
```shell
With branch 24 it shows:
`Unknown base 'core24-desktop'`
With branch 22 it crashes with:
Traceback (most recent call last):
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/application.py", line 361, in main
return app.run()
File "/snap/snapcraft/11722/lib/python3.10/site-packages/craft_application/application.py", line 488, in run
dispatcher = self._get_dispatcher()
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/application.py", line 220, in _get_dispatcher
raise errors.ClassicFallback()
snapcraft.errors.ClassicFallback
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/models/project.py", line 651, in _providers_base
return SNAPCRAFT_BASE_TO_PROVIDER_BASE[base]
KeyError: 'core22-desktop'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/snap/snapcraft/11722/bin/snapcraft", line 8, in <module>
sys.exit(main())
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/application.py", line 364, in main
return cli.run()
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/cli.py", line 222, in run
_run_dispatcher(dispatcher, global_args)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/cli.py", line 194, in _run_dispatcher
dispatcher.run()
File "/snap/snapcraft/11722/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/commands/core22/lifecycle.py", line 265, in run
super().run(parsed_args)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/commands/core22/lifecycle.py", line 138, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 104, in run
project = models.Project.unmarshal(yaml_data_for_arch)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/models/project.py", line 876, in unmarshal
project = Project(**data)
File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__
File "pydantic/main.py", line 1100, in pydantic.main.validate_model
File "/snap/snapcraft/11722/lib/python3.10/site-packages/craft_application/models/project.py", line 178, in _validate_devel
base_alias = cls._providers_base(base)
File "/snap/snapcraft/11722/lib/python3.10/site-packages/snapcraft/models/project.py", line 653, in _providers_base
raise CraftValidationError(f"Unknown base {base!r}") from err
craft_application.errors.CraftValidationError: Unknown base 'core22-desktop'
```
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #4850 (commit 61efc790d); Snapcraft 8.3.0 accepts core22-desktop and core24-desktop bases, restoring gadget builds. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft 8.x rejected core22-desktop/core24-desktop bases, breaking pc-amd64-gadget-desktop builds. Fixed by merged PR #4850 (commit 61efc790d), shipped in 8.3.0. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #4850 (commit 61efc790d), adding support for core22-desktop and core24-desktop bases and restoring gadget builds in Snapcraft 8.x. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft 8.x rejected core22-desktop/core24-desktop bases. Fixed by merged PR #4850 (commit 61efc790d, "fix: allow coreXX-desktop bases"), mapping desktop bases to their provider base; changelog notes the core22-desktop regression fix under #4818. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in merged PR #4850 (commit 61efc790d): Snapcraft now accepts core22-desktop and core24-desktop, restoring pc-amd64-gadget-desktop builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via PR #4850 by expanding snapcraft's base validation to accept core22-desktop and core24-desktop. This addresses the snapcraft 8.x regression blocking pc-amd64-gadget-desktop builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved via PR #4850 by expanding accepted base values to include core22-desktop and core24-desktop, fixing the snapcraft 8.x build regression. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved via PR #4850, which expanded accepted base values to include core22-desktop and core24-desktop, fixing the snapcraft 8.x build regression. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by merging PR #4850, which expands accepted base values to include core22-desktop and core24-desktop. This fix addresses the snapcraft 8.x regression preventing pc-amd64-gadget-desktop builds. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4850
(confidence 100%)
Merged commit 61efc790d added the missing desktop-base validation support.
Related issues
No related issues found above the similarity threshold.