Repository navigation
Conversation
[Low impact] The PR appears safe to merge; both previous findings are addressed. SummaryPins the filtered
Reviews (2) · Last reviewed commit: "test: stop asserting the sudo stub's LC_..." · Reviewed by Greptile |
manuaudio
left a comment
There was a problem hiding this comment.
AI-assisted test run (an agent ran these, not a hand test) on Omarchy 4.0.4 (x86_64, pacman 7.1.0), with this PR at e9fa3eb.
bash test/shell.d/update-keyring-test.sh: 16/16 ok on quattro (ac6cb9c), 17/17 ok on this PR. With this PR's test but the oldbin/omarchy-update-keyring, it fails at "update-keyring forces the C locale on the keyring refresh", so the new assertion does catch the missing change.- Real pacman, against a copy of the local database (
fakeroot pacman -S --needed --noconfirm --dbpath <copy> omarchy-keyring), with French messages and stderr piped through the script's grep filter:- as on quattro:
avertissement : omarchy-keyring-20251027-1 est à jour -- ignorégets through the filter - with
env LC_ALL=Cas in this PR: that line is filtered out
- as on quattro:
- French messages came from
LANGUAGE=frunderLANG=en_US.UTF-8, because the test machine has no fr_FR locale generated.LC_ALL=Coverrides that too. Not tested: a realsudo pacman -Syrefresh, or an actualfr_FR.UTF-8locale.
…yle in stub loop Addresses greptile P2 findings on PR omacom#18634.
|
Thanks for tracking this down, @AnPod. This is the same fix as #7609, which was opened in August against What makes them the same: both change the one keyring refresh in The only parts here that #7609 lacks are Who checked: Claude Opus 5.5 compared the two diffs against If I've got this wrong and something here is missing from #7609, say so and it can be reopened. |
Fixes #18477
Problem
On non-English locales (e.g.
fr_FR.UTF-8) the Update signing keys stage ofomarchy updateleaks localized pacman notices through the stderr filter inbin/omarchy-update-keyring:The filter only matches the English wording (
^warning: …-keyring-… is up to date -- skipping$), so any non-English locale turns the expected silence into warning spam.Fix
Pin the locale of that one pacman call:
sudo pacman -Sy …→sudo env LC_ALL=C pacman -Sy …(bin/omarchy-update-keyring:95).LC_ALLoverridesLANGand everyLC_*category, so pacman's stderr is guaranteed English and the existing filter keeps matching regardless of the caller's locale. The user's system locale is untouched everywhere else.The bootstrap-path
sudo pacman -Sy(line 33) deliberately keeps noLC_ALL=C— it has no filter, so there is nothing to keep English. The other sudo calls (pacman-key --add/--lsign-key/--populate/--list-keys,gpg --homedir …) are untouched.Test
test/shell.d/update-keyring-test.sh: thesudostub now logsenv/VAR=valueargv and theLC_ALLit sees exported in its own environment; every keyring-refresh argv assertion now requiresenv LC_ALL=C; a new assertion proves the C locale actually reaches the child environment of the refresh — and only of the refresh (populate/--add/--lsign-keyover-application is guarded by the existing exact argv assertions). AmbientLC_ALLis unset in the test process so the new check cannot pass vacuously. 17/17 assertions pass; the suite fails at exactly the new assertion with the script change reverted (red-check).bash -non both files.