← Back to issue list

[3.9-backport] meta: ensure Snap's `assumes` is initialized as a set

View original Github issue

Metadata

Project
snapcraft
Number
#2879
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged backport #2879 (commit 2f3a9cc14) fixed SNAPCRAFT-16C by initializing Snap assumes as a set, preventing command-chain .add() exceptions. Backported from #2796.

Resolution: closed resolved

Reason: PR #2879 was approved and merged with commit 2f3a9cc14, adding the set initialization and unit coverage for command-chain handling.

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. Fixes SNAPCRAFT-16C 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 backport #2879 (commit 2f3a9cc14) fixed SNAPCRAFT-16C by initializing Snap assumes as a set, preventing command-chain .add() exceptions. Backported from #2796.
stealth/space-bunny-alpha — closed resolved Merged 3.9 backport #2879 in commit 2f3a9cc14, initializing Snap assumes as a set to prevent command-chain failures and adding regression coverage.
stealth/space-bunny-alpha — closed resolved Merged backport PR #2879 (commit 2f3a9cc14) into the 3.9 branch, fixing SNAPCRAFT-16C by initializing the snap meta `assumes` list as a set and adding a unit test, backporting the original fix from #2796.
stealth/space-bunny-alpha — closed resolved Merged 3.9 backport #2879 fixed SNAPCRAFT-16C by initializing assumes as a set, preventing command-chain exceptions; original fix: #2796, backport commit: 2f3a9cc14.
qwen/qwen3.6-35b-a3b — — Merged backport to 3.9 resolving SNAPCRAFT-16C. Converts the assumes property from a list to a set during config initialization to prevent command-chain exceptions. Includes regression test coverage.
qwen3.6-35b-a3b-mtp-q6 — — Merged a 3.9 backport fixing SNAPCRAFT-16C by converting the assumes property from a list to a set during config parsing. This prevents command-chain exceptions and includes a verification test.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2796 (confidence 100%)

    Original merged fix that was backported to the 3.9 branch by #2879.

Related issues

Issue Project State Summary Similarity
#2796 meta: ensure Snap's `assumes` is initialized as a set snapcraft merged 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.
87%
#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.
76%
#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.
75%
#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.
73%