mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
fix: update check survives a non-version release tag; quiet-step log in log/
This commit is contained in:
1 parent
18e06797b3
commit
095e7bca5c
5 files changed
+9
-7
No files matched your search
@@ -95,7 +95,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine
|
||||
extra (an icon cache, a service that may not exist) warns or stays silent and
|
||||
doesn't change the return value. Never `cmd 2>/dev/null` on a step that
|
||||
changes the system: use `best_effort cmd...` (same exit status, its errors go
|
||||
to `$STATE_DIR/steamify.log`). `2>/dev/null` stays for probes (`pacman -Q`,
|
||||
to `$STATE_DIR/log/steamify.log`). `2>/dev/null` stays for probes (`pacman -Q`,
|
||||
`grep -q`, `is-active`) whose failure is the answer.
|
||||
- **Temp dirs.** `make_tmpdir <variable>` (not `$(mktemp -d)`, whose
|
||||
subshell can't register it): the entry point's `on_exit` removes them, also
|
||||
|
||||
+2
-1
@@ -13,9 +13,10 @@ one per merged pull request.
|
||||
- **refactor: `is_wanted` and `is_current` instead of repeated `[[ "${WANTED[x]}" == 1 ]]` checks in the menu, the app's backend and the entry point**
|
||||
- **refactor: the start of every item's JSON (id, label, hint, kind, parent) is built in one place (`json_item_head`) for the app and the installer page, and `json_bool` replaces the `&& echo true || echo false` copies**
|
||||
- **ci: a Lint workflow runs shellcheck on the modules and helper scripts, ruff on the app and `patches/*.py` (`ruff.toml`) and qmllint on the QML (not blocking until it has run once on the runner); `make lint` runs the same locally**
|
||||
- **refactor: `best_effort` for the steps whose failure doesn't matter (stopping or disabling units, removing packages, `modprobe -r`, ...): same behaviour, but their errors go to `~/.local/state/steamify/steamify.log` instead of `/dev/null`; temp dirs are registered with `make_tmpdir` and removed by the one exit handler (also when a run is interrupted), which replaces the menu's own `EXIT` trap**
|
||||
- **refactor: `best_effort` for the steps whose failure doesn't matter (stopping or disabling units, removing packages, `modprobe -r`, ...): same behaviour, but their errors go to `~/.local/state/steamify/log/steamify.log` instead of `/dev/null`; temp dirs are registered with `make_tmpdir` and removed by the one exit handler (also when a run is interrupted), which replaces the menu's own `EXIT` trap**
|
||||
- **refactor: the retired kernel pin moved out of `lib/steam-machine.sh` into `lib/kernel-pin.sh`**
|
||||
- **refactor: the shortcut's two start scripts are files in `patches/` (`steamify-start.sh`, `steamify-app-start.sh`) instead of heredocs in `launcher_enable`, and the 83-line LED driver install is split into steps (`led_write_dkms_override`, `led_install_package`, `led_build_all_kernels`, `led_load_module`); what gets installed is byte-identical**
|
||||
- **fix: the daily update check no longer crashes on a release tag that isn't a plain version number (`TypeError` comparing it, found by the new unit tests); it is simply never offered**
|
||||
- **test: the menu rules, the plan and the app's and installer's JSON are checked against a golden file (`tests/menu-test.sh` in steamify-cachyos-dev); `make check`, `.editorconfig`, `.shellcheckrc`**
|
||||
- **docs: README lists the sources and projects Steamify builds on, with licences and thanks**
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ See [TECHNICAL.md](TECHNICAL.md) for how each part works.
|
||||
|
||||
Steps that may fail without it mattering (stopping a service that isn't
|
||||
running, removing a package that isn't installed) don't show their errors in the
|
||||
wizard. They are kept in `~/.local/state/steamify/steamify.log` (the last
|
||||
wizard. They are kept in `~/.local/state/steamify/log/steamify.log` (the last
|
||||
512 KB), with the command and its exit status: attach it when you ask for help.
|
||||
|
||||
## Gaming mode shows a black screen or keeps restarting
|
||||
|
||||
+2
-2
@@ -43,9 +43,9 @@ best_effort() {
|
||||
# best_effort <command>...: for a step whose failure is fine (stopping a
|
||||
# unit that isn't running, removing what isn't installed). Same exit status
|
||||
# and output as the command, but its errors go to the log
|
||||
# (~/.local/state/steamify/steamify.log) instead of vanishing, so a problem
|
||||
# (~/.local/state/steamify/log/steamify.log) instead of vanishing, so a problem
|
||||
# can still be found afterwards.
|
||||
local log="${STEAMIFY_LOG:-${STATE_DIR:-$HOME/.local/state/steamify}/steamify.log}" e rc
|
||||
local log="${STEAMIFY_LOG:-${STATE_DIR:-$HOME/.local/state/steamify}/log/steamify.log}" e rc
|
||||
e="$(mktemp)" || { "$@" 2>/dev/null; return; }
|
||||
"$@" 2>"$e"; rc=$?
|
||||
if [[ -s "$e" ]]; then
|
||||
|
||||
@@ -51,8 +51,9 @@ def latest():
|
||||
|
||||
def pending(new):
|
||||
# Newer than the last Steamify that ran here, and not skipped.
|
||||
seen = version(state("seen") or "0")
|
||||
return seen is not None and version(new) > seen and new != state("skipped")
|
||||
seen, found = version(state("seen") or "0"), version(new)
|
||||
# A tag that isn't a plain version (a pre-release name) is never offered.
|
||||
return seen is not None and found is not None and found > seen and new != state("skipped")
|
||||
|
||||
|
||||
def desktop():
|
||||
|
||||
Reference in new issue
Block a user