← Back to issue list

meta: always generate snapcraft-runner to workaround classic (#2889)

View original Github issue

Metadata

Project
snapcraft
Number
#2891
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in PR #2891 as commit 343ac2862, adding an empty snapcraft-runner command-chain workaround for classic apps with incorrect PATH handling and unit tests.

Resolution: closed resolved

Reason: PR #2891 was merged as commit 343ac2862. It always generates snapcraft-runner for apps to address the classic PATH problem tracked in #2889 (LP#1860369), with unit-test coverage.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged in PR #2891 as commit 343ac2862, adding an empty snapcraft-runner command-chain workaround for classic apps with incorrect PATH handling and unit tests.
stealth/space-bunny-alpha — closed resolved Merged as 343ac2862: always generate snapcraft-runner for apps without shells to work around classic PATH failures (LP#1860369), with unit tests.
stealth/space-bunny-alpha — closed resolved Merged PR #2889 (commit 343ac2862) added a temporary snapcraft-runner for all apps to work around classic snap PATH handling, with unit tests. The underlying snapd bug is LP#1860369.
stealth/space-bunny-alpha — closed resolved Merged PR #2889 via commit 343ac2862: always generate snapcraft-runner in app command chains, with unit tests, to work around classic snap PATH failures (LP#1860369).
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.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2889 (confidence 95%)

    The PR title and description explicitly identify #2889 as the classic PATH issue addressed by this workaround.

Related issues

Issue Project State Summary Similarity
#2889 meta: always generate snapcraft-runner to workaround classic PATH bug snapcraft merged Merged #2889 as commit 343ac2862, always adding an empty snapcraft-runner to app command chains to work around incorrect PATH in non-shell classic apps.
94%
#3087 meta: remove snapd workaround for classic for core20 onwards snapcraft merged Merged canonical/snapcraft#3087 as commit 244b997ca, removing the automatic classic snapcraft-runner workaround for core20 and newer while retaining it for legacy bases.
80%
#1681861 classic snaps recurse snapcraft (launchpad) open Classic PATH recursion was addressed by commit 343ac2862, which added the snapcraft-runner workaround; current metadata tests still expect that runner in command chains.
76%
#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%
#2853 meta: do not set snapcraft-runner when adapter is "none" snapcraft merged Merged PR #2853 fixed app metadata handling so adapter: none does not add snapcraft-runner to command-chain; full and legacy adapters still do (commit 9599497fb).
72%
#949 project: support building classic snaps snapcraft merged Merged PR #949 in commit 058f5626d, adding classic-snap build support and core-snap path configuration.
71%
#2861 meta: remove Application's `prepend_command_chain` snapcraft merged PR #2861 merged as commit 61bd3ab5d: dropped Application.prepend_command_chain and renamed snap packaging's _generate_command_chain to _generate_snapcraft_runner. Follow-up fix #2864 also merged.
71%