meta: always generate snapcraft-runner to workaround classic (#2889)
Metadata
Current evaluation
Merged as #2889. Introduces an empty snapcraft-runner to the command-chain to fix incorrect PATH resolution for classic snap apps. Includes unit tests and configurable fixtures. Approved by reviewers and passed CI.
Suggested action: —
No scores available.
Issue body
Snapcraft previously generated wrappers for most commands. Once
snapcraft became more conserative about generating unnecessary wrappers,
issues began to surface with regard to PATH being set incorrectly
for classic snap apps that did not use shell.
To work around the issue, this commit adds an empty snapcraft-runner to
the command-chain for all apps, where they typically would have none.
Once this issue is resolved in snapd, we can probably remove this
workaround.
Add unit tests for snapcraft-runner generation
Add some additional parameters to the SnapcraftYaml fixture
to make it more configurable.
LP#: 1860369
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Signed-off-by: Sergio Schvezov <sergio.schvezov@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 |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged as #2889. Introduces an empty snapcraft-runner to the command-chain to fix incorrect PATH resolution for classic snap apps. Includes unit tests and configurable fixtures. Approved by reviewers and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | PR #2889 merged to fix PATH issues for classic snap apps by always generating an empty snapcraft-runner. This serves as a temporary workaround until snapd resolves the underlying issue. Includes unit tests and fixture updates. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a workaround that always generates a snapcraft-runner to correct PATH handling for classic snap apps. Includes unit tests and fixture updates. Addresses LP#1860369 and remains in place until snapd resolves the underlying issue. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2889 meta: always generate snapcraft-runner to workaround classic PATH bug | snapcraft | merged | Merged a workaround that always generates snapcraft-runner to resolve classic snap PATH bugs. Unit and integration tests were added. This temporary fix addresses snapd issue LP#1860369 and will be removed once snapd resolves the underlying problem. | |
| #2853 meta: do not set snapcraft-runner when adapter is "none" | snapcraft | merged | Merged fix ensuring snapcraft honors the 'none' adapter setting by omitting the snapcraft-runner command-chain. Previously, the runner was incorrectly injected regardless of adapter configuration. Approved and merged with accompanying spread tests. | |
| #2864 meta: assume command-chain fix for prepending snapcraft-runner | snapcraft | merged | Merged a fix adding a missing check for prepend_command_chain when determining if command-chain should be assumed in metadata. Includes updated assumes coverage tests. Approved by one reviewer and passed CI checks. | |
| #3087 meta: remove snapd workaround for classic for core20 onwards | snapcraft | merged | Removed snapd classic confinement workaround for core20 and newer bases. Retained command-chain workaround for core, core16, core18, and no base. Merged after single reviewer approval and passing CI checks. | |
| #949 project: support building classic snaps | snapcraft | merged | Added support for building classic snaps by configuring core snap paths. Reviewer feedback on architecture-specific linker paths was addressed, and the changes were approved and merged into master. |