[PR #217] run_wine_session: initialize and stop the prefix with $WINE #269

Open
opened 2026-11-26 20:17:20 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/217
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9952


📝 Commits (1)

  • a8b661c run_wine_session: initialize and stop the prefix with $WINE

📊 Changes

3 files changed (+94 additions, -3 deletions)

View changed files

📝 docs/testing.md (+3 -1)
📝 scripts/run_wine_session.sh (+16 -2)
➕ tests/test_run_wine_session.py (+75 -0)

📄 Description

Carried over from old PR 9952 by SkippySteve in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9952, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
SkippySteve: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7116873558

scripts/run_wine_session.sh ran wineboot and wineserver from PATH, while run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or UMU-Proton's files/bin/wine:

  • on a host without a system Wine, the script stopped at timeout: failed to run command 'wineboot' (exit 127), and the exit trap printed wineserver: command not found;
  • on a host with a system Wine, the prefix was initialized by that other Wine, and the trap stopped the wrong wineserver.

The script now runs "$WINE" wineboot --init (default wine, as run_wine_tests.py does) and, at exit, stops $WINESERVER, else the wineserver next to $WINE, else wineserver on PATH (the same lookup winetricks uses). A WINE that can't be found is reported with status 127. CI doesn't set WINE, so it still uses the Wine on PATH and its wineserver. docs/testing.md says so in one sentence.

Tests

  • tests/test_run_wine_session.py (new, fake wine/wineserver scripts, including a path with a space): 4 tests pass; against the old script all 4 fail.
  • Arch Linux, UMU-Proton 11.0-2e, no system Wine: WINE=<UMU-Proton>/files/bin/wine WINEPREFIX=$(mktemp -d) bash scripts/run_wine_session.sh "$WINE" cmd /c echo … initializes the prefix, prints the echo, exits 0, and leaves no wineserver running. The old script exits 127 here.
  • bash -n, scripts/check_no_game_data.py clean.

No game files used. AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/217 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9952` --- ### 📝 Commits (1) - [`a8b661c`](https://github.com/ubiquitarianism/leonida/commit/a8b661cf4050c44e96708c23c387ccbf1bab857b) run_wine_session: initialize and stop the prefix with $WINE ### 📊 Changes **3 files changed** (+94 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+3 -1) 📝 `scripts/run_wine_session.sh` (+16 -2) ➕ `tests/test_run_wine_session.py` (+75 -0) </details> ### 📄 Description > Carried over from **old PR 9952** by `SkippySteve` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9952`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `SkippySteve`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7116873558 `scripts/run_wine_session.sh` ran `wineboot` and `wineserver` from `PATH`, while `run_wine_tests.py` runs the tests with `$WINE`. With `WINE` set to Proton's or UMU-Proton's `files/bin/wine`: - on a host without a system Wine, the script stopped at `timeout: failed to run command 'wineboot'` (exit 127), and the exit trap printed `wineserver: command not found`; - on a host with a system Wine, the prefix was initialized by that other Wine, and the trap stopped the wrong wineserver. The script now runs `"$WINE" wineboot --init` (default `wine`, as `run_wine_tests.py` does) and, at exit, stops `$WINESERVER`, else the `wineserver` next to `$WINE`, else `wineserver` on `PATH` (the same lookup winetricks uses). A `WINE` that can't be found is reported with status 127. CI doesn't set `WINE`, so it still uses the Wine on `PATH` and its `wineserver`. `docs/testing.md` says so in one sentence. ### Tests - `tests/test_run_wine_session.py` (new, fake wine/wineserver scripts, including a path with a space): 4 tests pass; against the old script all 4 fail. - Arch Linux, UMU-Proton 11.0-2e, no system Wine: `WINE=<UMU-Proton>/files/bin/wine WINEPREFIX=$(mktemp -d) bash scripts/run_wine_session.sh "$WINE" cmd /c echo …` initializes the prefix, prints the echo, exits 0, and leaves no wineserver running. The old script exits 127 here. - `bash -n`, `scripts/check_no_game_data.py` clean. No game files used. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#269
No description provided.