Advanced grammar doesn't support multiple selectors (v8.0)
Bug #2066280 reported by
Michał Sawicz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Following https:/
Given the following snapcraft.yaml:
```yaml
name: my-snap-name
base: core24
version: '0.1'
summary: Summary
description: Description
grade: devel
confinement: strict
parts:
my-part:
plugin: nil
stage-packages:
- on amd64: [cowsay]
- on amd64,arm64: [sl]
```
Only `cowsay` is staged:
```
$ ls -d /snap/my-
ls: cannot access '/snap/
/snap/my-
```
To post a comment you must log in.
The key statement in the documentation is, "The body of the on clause is taken into account if every (AND, not OR) selector is true for the build environment."
Right now, advanced grammar only supports architectures so there is currently not a scenario where `on arch1,arch2` will ever be true.
It would be a better UX if snapcraft didn't allow multiple `on` selectors or logged a warning.