meta: ensure Snap's `assumes` is initialized as a set
Metadata
Current evaluation
Merged PR #2796 (commit 2f3a9cc14) initialized Snap metadata's assumes as a set and added tests, fixing command-chain failures when the assumption was absent.
Resolution: closed resolved
Reason: PR #2796 was approved and merged as commit 2f3a9cc14, converting assumes from a list to a set and adding coverage for the command-chain fix.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When reading the config data dictionary, convert the list to a set.
The `assumes` property is defined as a set in Snap meta, but derives
from a list in the the snap meta. This causes an exception when
using `command-chain`, but `command-chain` is not already in
the `assumes` (due to the use of Snap's usage of `.add()` on the
set, which is not available for lists).
Add a test for coverage/verification.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2796 (commit 2f3a9cc14) initialized Snap metadata's assumes as a set and added tests, fixing command-chain failures when the assumption was absent. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2796 (commit 2f3a9cc14) to initialize Snap meta assumes as a set and add tests, preventing command-chain handling failures. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2796 initializes Snap's assumes metadata as a set and adds unit coverage, fixing command-chain handling when the assumption was absent (commit 2f3a9cc14). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR initialized Snap's `assumes` as a set and added unit coverage, fixing command-chain handling when command-chain is not already assumed (SNAPCRAFT-16C). | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for SNAPCRAFT-16C that converts the assumes configuration from a list to a set during initialization. This resolves a runtime exception when using command-chain by ensuring the add method functions correctly. Includes updated unit tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Converts the assumes property from a list to a set during config parsing to prevent AttributeError when using command-chain, which calls set add methods. Includes updated unit tests and resolves SNAPCRAFT-16C. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2879 [3.9-backport] meta: ensure Snap's `assumes` is initialized as a set | snapcraft | merged | Merged backport #2879 (commit 2f3a9cc14) fixed SNAPCRAFT-16C by initializing Snap assumes as a set, preventing command-chain .add() exceptions. Backported from #2796. | |
| #2864 meta: assume command-chain fix for prepending snapcraft-runner | snapcraft | merged | Merged #2864 in commit 94e9ef908, correcting assumes detection when snapcraft-runner is prepended via command-chain and adding test coverage. | |
| #2019931 snapcraft is ignoring the "assumes" section | snapcraft (launchpad) | closed | Snapcraft 7.3.1 dropped project-provided assumes from meta/snap.yaml (hit core22 builds and Docker). Fixed by snapcore/snapcraft PR #4152 (commit 36dca729e); reporter confirmed working in 7.3.2. | |
| #1799295 Snapcraft should add an "assumes" if full adapter is used | snapcraft (launchpad) | closed | Fixed by snapcraft PR #2379 ("meta: add assumes if using 'full' app adapter"), merged as commit 2b5a254ef; Snapcraft now adds assumes: [command-chain] when the full adapter is used. Maintainer ~kyrofa closed LP #1799295 citing that PR. |