You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snapcraft will fail to replace the new variable syntax and will only replace the old variable syntax.
To Reproduce
Install snapcraft 7.x (only tested 7.5.4+), use the provided snapcraft.yaml.
Compare the error message just in case you remove the {} around the variable.
Environment
Ubuntu 23.04, building with --use-lxd
snapcraft.yaml
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core22 # 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 channelsconfinement: devmode # use 'strict' once you have the right plugs and slotsarchitectures: - build-on: amd64 build-for: riscv64parts: my-part: # See 'snapcraft plugins' plugin: nil build-packages: - gcc-${CRAFT_ARCH_TRIPLET_BUILD_FOR}
The problem here is that CRAFT_ARCH_TRIPLET_BUILD_FOR was introduced in craft-parts 1.24.0, but Snapcraft 7.5.x uses craft-parts 1.19.7.
For that particular case you can fallback to CRAFT_ARCH_TRIPLET instead
so the env did not get replaced, leaving the _ after the : triggering the slice check. The slice check probably needs to check things before the architecture check. I am not even sure we support slices with architecture tags, so : might also not be allowed for slices specifically
I wonder how useful it is to fix this on the slice-verification side, because if a variable didn't get expanded then basically all bets are off: the build would fail later when trying to install gcc-${CRAFT_ARCH_TRIPLET_BUILD_FOR} from apt
Bug Description
Snapcraft will fail to replace the new variable syntax and will only replace the old variable syntax.
To Reproduce
Install snapcraft 7.x (only tested 7.5.4+), use the provided snapcraft.yaml.
Compare the error message just in case you remove the
{
}
around the variable.Environment
Ubuntu 23.04, building with --use-lxd
snapcraft.yaml
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: