diff --git a/AGENTS.md b/AGENTS.md index cf5a15d..3fb68c3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 ` (not `$(mktemp -d)`, whose subshell can't register it): the entry point's `on_exit` removes them, also diff --git a/CHANGELOG.md b/CHANGELOG.md index ee23cc9..3aace20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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** diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 2650301..26166e0 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -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 diff --git a/lib/common.sh b/lib/common.sh index 691eb9c..bf88373 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -43,9 +43,9 @@ best_effort() { # best_effort ...: 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 diff --git a/patches/steamify-notifier.py b/patches/steamify-notifier.py index bf198b9..351d92c 100644 --- a/patches/steamify-notifier.py +++ b/patches/steamify-notifier.py @@ -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():