fix(deploy): rpm -q reports "not installed" on stdout, defeating the sentinel #227

Merged
grenade merged 1 commits from fix/deploy-rpm-q-detection into main 2026-08-04 04:16:45 +00:00
Owner

Every deploy job used

installed=$(rpm -q --qf '...' "$pkg" 2>/dev/null || echo "not-installed")

but rpm -q prints package X is not installed to stdout and exits
1, so the || branch never runs and $installed holds the message text
rather than the sentinel. Visible in the deploy log:

helexa-angels: installed=package helexa-angels is not installed

Harmless in the three long-standing jobs — a bogus version string is
still unequal to the published one, so they install anyway — but it made
the unpublished-package guard added in #226 dead code, since that guard
tests for exactly this sentinel. Fixed at all four sites so the pattern
is not copied into a fifth.

I made the same mistake in a throwaway watcher script within the same
hour, which is reasonable evidence it is an easy one to make: rpm -q
looks like it fails cleanly and does not.

Note the actual blocker for the first angels deploy was separate and
already resolved out of band: gitea_ci had no sudoers entries for
helexa-angels on gallumbits. Those entries shipped in #225 but
asset/sudoers.d/ is only applied by script/infra-setup.sh, so
committing them is not installing them — the #188 first-rollout gotcha,
hit again. They are installed now.

Every deploy job used ```sh installed=$(rpm -q --qf '...' "$pkg" 2>/dev/null || echo "not-installed") ``` but `rpm -q` prints `package X is not installed` to **stdout** and exits 1, so the `||` branch never runs and `$installed` holds the message text rather than the sentinel. Visible in the deploy log: ``` helexa-angels: installed=package helexa-angels is not installed ``` Harmless in the three long-standing jobs — a bogus version string is still unequal to the published one, so they install anyway — but it made the unpublished-package guard added in #226 dead code, since that guard tests for exactly this sentinel. Fixed at all four sites so the pattern is not copied into a fifth. I made the same mistake in a throwaway watcher script within the same hour, which is reasonable evidence it is an easy one to make: `rpm -q` looks like it fails cleanly and does not. Note the *actual* blocker for the first angels deploy was separate and already resolved out of band: `gitea_ci` had no sudoers entries for helexa-angels on gallumbits. Those entries shipped in #225 but `asset/sudoers.d/` is only applied by `script/infra-setup.sh`, so committing them is not installing them — the #188 first-rollout gotcha, hit again. They are installed now.
grenade added 1 commit 2026-08-03 22:16:16 +00:00
fix(deploy): rpm -q reports "not installed" on stdout, not via exit only
All checks were successful
CI / Format (push) Successful in 8s
CI / Clippy (push) Successful in 2m24s
CI / Format (pull_request) Successful in 7s
CI / Test (push) Successful in 9m20s
CI / CUDA type-check (push) Successful in 19m13s
CI / Build cortex SRPM (push) Has been skipped
CI / Publish cortex to COPR (push) Has been skipped
CI / Build neuron SRPM (push) Has been skipped
CI / Publish neuron to COPR (push) Has been skipped
CI / Bump version in source (push) Has been skipped
CI / CUDA type-check (pull_request) Successful in 20m19s
CI / Clippy (pull_request) Successful in 2m31s
CI / Test (pull_request) Successful in 8m27s
CI / Build cortex SRPM (pull_request) Has been skipped
CI / Publish cortex to COPR (pull_request) Has been skipped
CI / Build neuron SRPM (pull_request) Has been skipped
CI / Publish neuron to COPR (pull_request) Has been skipped
CI / Bump version in source (pull_request) Has been skipped
10bc5c0a20
Every deploy job used

    installed=$(rpm -q --qf '...' "$pkg" 2>/dev/null || echo "not-installed")

but `rpm -q` prints "package X is not installed" to STDOUT and exits 1,
so the `||` branch never runs and `$installed` holds the message text
rather than the sentinel. The logs show it plainly:

    helexa-angels: installed=package helexa-angels is not installed

Harmless in the three long-standing jobs — a bogus version string is
still unequal to the published one, so they install anyway — but it made
the unpublished-package guard added in the previous commit dead code,
since it tests for exactly that sentinel. Fixed at all four sites so the
pattern is not copied into a fifth.

Same mistake I made in a throwaway watcher script minutes earlier, which
is a decent argument for it being an easy one to make: `rpm -q` looks
like it fails cleanly and does not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0165r11RzqkMqWWXfJE8tAVU
grenade merged commit f2cdb51bf8 into main 2026-08-04 04:16:45 +00:00
grenade deleted branch fix/deploy-rpm-q-detection 2026-08-04 04:16:45 +00:00
Sign in to join this conversation.