← Back to issue list

snap: legacy needs to now it is legacy for re-exec

View original Github issue

Metadata

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

Current evaluation

Merged #2311 fixed root re-exec invoking legacy Snapcraft with the correct interpreter, resolving LP #1795501.

Resolution: closed resolved

Reason: PR #2311 was merged; it explicitly prepends the interpreter when invoking the legacy Snapcraft script, preventing root re-exec from selecting the wrong interpreter.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When running in in re-exec mode and re-exec'ing as root the wrong interpreter is used. This is solved by calling the snapcraft "script" by prepending the interpreter. LP: #1795501 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/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] 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 #2311 fixed root re-exec invoking legacy Snapcraft with the correct interpreter, resolving LP #1795501.
stealth/space-bunny-alpha — closed resolved Merged canonical/snapcraft#2311 fixes root re-exec selecting the wrong interpreter by explicitly invoking the legacy snapcraft script; it addresses LP #1795501.
qwen/qwen3.6-35b-a3b — — Merged Sergio Schvezov's fix for a snap re-exec interpreter bug when running as root. The change ensures legacy snaps correctly identify themselves during re-execution, resolving Launchpad issue #1795501. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for legacy snap re-execution in root mode, which previously invoked the wrong interpreter. The change prepends the correct interpreter to the snapcraft script, resolving Launchpad bug #1795501.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3543 snap: remove support for legacy re-exec (CRAFT-205) snapcraft merged Merged PR #3543 for CRAFT-205, removing legacy snap re-exec support in commit d475b85cf via merge commit 50e034a7a.
73%
#1795680 Consolidate root execution with legacy re-execution snapcraft (launchpad) closed Fixed by canonical/snapcraft#2385 (commit 404255671), consolidating root and legacy re-execution through one CLI entry point and provider root handling.
73%
#1793261 Vendor legacy snapcraft to maintain backward compatibility snapcraft (launchpad) closed Legacy Snapcraft was vendored into the snapcraft snap, dispatching projects without bases to it. Delivered via merged PRs canonical/snapcraft#2283 (commit f9592939a, override-build refactor) and #2285 (commit 5c1ee3b88).
72%
#2285 snapcraft snap: vendor legacy snapcraft snapcraft merged Merged in canonical/snapcraft#2285 (commit 5c1ee3b88), vendoring legacy Snapcraft and dispatching no-base projects to it to preserve backward compatibility.
71%