Skip to content

fix: do not treat an unreadable yad version as too old - #23

Merged
360900 merged 1 commit into
360900:mainfrom
Plasma-Deckery:fix-yad-version-unknown
Oct 17, 2026
Merged

360900 merged 1 commit into
360900:mainfrom
Plasma-Deckery:fix-yad-version-unknown

Conversation

@phischdev

Copy link
Copy Markdown
Contributor

checkIntDeps probes yad for its version and compares it against 7.2:

YADVER="$("$YAD" --version | tail -n1 | cut -d ' ' -f1)"

When the probe produces nothing, YADVER is the empty string — and sort -V puts that before 7.2, so a yad that simply would not answer is reported as

ERROR - checkIntDeps - Yad version '' is too old. You need to update to at least '7.2'

and the whole run exits.

This happens in practice

A systemd user unit started at login inherits a DISPLAY that does not answer yet. yad exits without printing, and the probe comes back empty. From the journal of a Steam Deck running the artwork watcher from #15:

2026-10-10T22:23:52  -- boot --
2026-10-10T22:24:23  Starting tinkergame-artwork.service...
2026-10-10T22:24:28  yad[5033]: cannot open display:
2026-10-10T22:24:28  ERROR - checkIntDeps - Yad version '' is too old. You need to update to at least '7.2'
2026-10-10T22:25:12  Starting tinkergame-artwork.service...
2026-10-10T22:25:15  ERROR - checkIntDeps - Yad version '' is too old.
2026-10-11T00:00:00  Starting tinkergame-artwork.service...   → fine

31 and 80 seconds after boot it fails; from then on it works. Ordering the unit After=graphical-session.target (which #20 did) is not enough, because the target goes active before a new client can open the display.

The command being aborted here needs no GUI at all — fetching artwork never opens a window. Any non-interactive use of TinkerGame from a unit, a hook or a script hits the same wall.

The change

An unreadable version is reported as unknown and the check is skipped for that run, instead of being read as "too old". Three cases now behave differently from each other:

Probe result Before After
empty (could not ask) "too old", exit warn, continue
read, below minimum "too old", exit unchanged
read, at or above minimum proceed unchanged

Only a version that could actually be verified is written back to the global config, so an unknown one does not get recorded as good.

Testing

Six tests in tests/unit/yadversion.bats, driving checkIntDeps with a yad stub that reports nothing, 6.0, or 9.3. Two fail on main and pass here; the other four pin the behaviour that was already correct, including that a genuinely old yad still aborts.

Note on CI

The Unit tests job fails on setGameVortexStaging: a configured stage is not replaced (tests/unit/vortex.bats:347). That is not from this change — it reproduces on an unmodified main in the same CI, while passing locally for me on both branches. I can open a separate issue if that is useful.

checkIntDeps probes yad for its version and compares it against 7.2:

    YADVER="$("$YAD" --version | tail -n1 | cut -d " " -f1)"

When the probe produces nothing, YADVER is the empty string, and sort -V puts
that before 7.2 — so a yad that simply would not answer is reported as

    ERROR - checkIntDeps - Yad version "" is too old. You need to update to at least "7.2"

and the whole run exits. That happens in practice: a systemd user unit started
at login inherits a DISPLAY that does not answer yet, yad exits without
printing, and the probe comes back empty. Measured on a Steam Deck, the
artwork watcher failed 31 and 80 seconds after boot and worked from then on.

Ordering the unit after graphical-session.target is not enough, because the
target goes active before a new client can open the display.

An unreadable version is now reported as unknown and the check is skipped for
that run, rather than being read as "too old". A version that was read and is
genuinely below the minimum still aborts, and only a version that could be
verified is written back to the global config.

The commands this unblocks need no GUI at all — fetching artwork never opens a
window.
@360900
360900 merged commit 8d02b63 into 360900:main Oct 17, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants