From a4abdabecbecd3e1cf75b8891d887e563dab27f5 Mon Sep 17 00:00:00 2001 From: dangreen Date: Tue, 20 Oct 2026 20:53:43 +0400 Subject: [PATCH] fix(installer): restart Steam only for an edit it undid, and answer Cancel A player saw Steam restart five or six times and the bar stand at 96% for minutes until they pressed Cancel, and the game was in the library anyway: - A rewrite of shortcuts.vdf that does not come within 210 s no longer counts as a failure. Every attempt waited the full time and then restarted Steam for the next one, four restarts in all; now the file is checked as it stands, and only a failed check leads to another attempt. - The wait at 96% counts on the bar: "0:42 so far, it can take up to 3:30". A retry says why Steam goes down again. - Cancel is answered. The button kdialog shows by default only hid the window, and the install went on unseen. While Steam is untouched, a closed window now stops the install, the unpacking included, with exit code 6 and a last window naming the folder with what was unpacked. Once Steam is down, the attempt in progress runs to its end but no other one starts, and a restart to put the shortcut list back is announced with a notification. --- SPEC.md | 8 +- packages/installer/README.md | 2 +- packages/installer/src/install.py | 111 +++++++++++++++++++---- packages/installer/src/selftest.py | 137 +++++++++++++++++++++++++++-- packages/installer/src/setup.sh | 12 ++- packages/installer/src/steamctl.py | 13 ++- 6 files changed, 255 insertions(+), 28 deletions(-) diff --git a/SPEC.md b/SPEC.md index 433ed23..1580e3e 100644 --- a/SPEC.md +++ b/SPEC.md @@ -195,6 +195,10 @@ The rule: **a GUI is shown only when the questions were asked through a GUI.** I Done: `kdialog --progressbar` returns a DBus reference, and `qdbus6` moves the bar through it. Python counts the unpacking percentage by bytes rather than by files: otherwise a 4 GB file would hold the bar still for a minute. The percentage then goes to the Python side through `--progress-ref`, and it labels its own stages: closing Steam, saving the backups, adding to the library, the artwork, starting it again, verifying. Without a GUI all of this is silently skipped: the install does not depend on the progress bar. +**The wait for the rewrite counts on the bar.** At 96% Steam can take minutes over the rewrite (5.1.0), and a bar that stands still that long reads as a hang. The label says how long it has been and how long it can be: "0:42 so far, it can take up to 3:30". + +**The Cancel button answers.** `kdialog --progressbar` shows one by default, from `QProgressDialog`, and pressing it only hides the window and sets `wasCancelled`: the install went on unseen, restarts of Steam included. Now `install.py` asks `wasCancelled`, and a reference that stops answering counts as closed too, since a window closed any other way may take `kdialog` down with it. While Steam is untouched, a closed window stops the install where it is: the unpacking stops, nothing is added, and exit code 6 makes the last window say so and name the folder with what was unpacked. Once Steam is down, the attempt in progress runs to its end, because Steam has to come back up anyway, but no other one starts. If that attempt failed, the list of shortcuts goes back as it was, and a notification says why Steam goes down once more. + **What asks the questions: `kdialog`.** Desktop Mode on SteamOS is KDE Plasma, and kdialog comes from KDE and draws native Qt windows. `--getexistingdirectory` settles the SD card question neatly: there is no need to detect `/run/media/deck/