mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #1446] make_game: stage the runtime install and publish it all or none (RT-249) (OLD-9937) #1475
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1475
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1446
Author: @LouisRiverstone
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:carry-old-9937📝 Commits (5)
d516872make_game: stage the runtime install before replacing the old files (RT-249)354142dMerge main into carry-old-9937860291ainstall_runtime: keep the old file when its own restore fails, drop stale staging folders, build the BCPack history under shaders/ (review of #1446)d1ec021Merge remote-tracking branch 'ubq/main' into HEAD6a72150install_runtime: keep the old file when its own restore fails, drop stale staging folders, build the BCPack history under shaders/ (review of #1446)📊 Changes
2 files changed (+357 additions, -27 deletions)
View changed files
📝
make_game.py(+115 -27)➕
tests/test_make_game_runtime_staging.py(+242 -0)📄 Description
Claimed in the coordination issue as: OLD-9937 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148463379)
Replaces the carried-over draft #204. I'm the original author of old upstream PR 9937.
What and why
RT-249. The runtime stage of
make_game.pycopied the files into--outone by one. A failure partway through (disk full, an interrupt, or on Windows a destination file held open by an antivirus scan or another program) could leave a newgta6rt.exenext to an oldgta6rt_tls_host.dll.The stage now writes every file, including
game_path.txt,shader_path.txtandgta6rt.sh, to a staging folder inside--out, on the same filesystem. Only once everything is there doespublish()move the files into place, all or none: each old file is first moved aside, and any failure puts back the files already published. If the rollback itself is blocked,IncompleteRollbackkeeps the staging folder, which then holds the old copies as<name>.old, and the error says where they are. Onmainthe stage already refuses an--outwhere one of the runtime file names is a directory, and that check is kept; it runs before the build.tests/test_make_game_runtime_staging.py(new, 12 tests) covers a failed copy, a failedgame_path.txtwrite, a failed publish with and without an old copy, a blocked rollback, a missing output folder, a--runtime-buildthat is the output folder itself,shader_path.txtstaged with the rest, and a restore that fails for the file being published, stale staging folders removed by the next install, the BCPack history path, and a successful run that leaves no staging folder.The old branch's final diff, applied on current
mainas one commit. It applied cleanly.Tested
python -I tests/test_make_game_runtime_staging.py: 9 tests OK on Linux (Python 3.14.4) and on Windows 11 (Python 3.11).tests/test_make_game*.pyfiles pass on Linux. On Windows 11 with Python 3.11, seven of them fail, and they fail the same way onmain, so the cause is that environment and not this change.python -m compileall -q make_game.py tools tests: OK.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule changes)On Windows a running
gta6rt.execan be renamed, so it does not block the install; its old copy may stay in a.runtime-staging-*folder, which the next install removes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.