fix(deploy): rpm -q reports "not installed" on stdout, defeating the sentinel #227
Reference in New Issue
Block a user
Delete Branch "fix/deploy-rpm-q-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every deploy job used
but
rpm -qprintspackage X is not installedto stdout and exits1, so the
||branch never runs and$installedholds the message textrather than the sentinel. Visible in the deploy log:
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 -qlooks 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_cihad no sudoers entries forhelexa-angels on gallumbits. Those entries shipped in #225 but
asset/sudoers.d/is only applied byscript/infra-setup.sh, socommitting them is not installing them — the #188 first-rollout gotcha,
hit again. They are installed now.
rpm -qreports "not installed" on stdout, not via exit onlyEvery 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