Sort package manifests under LC_ALL=C

pkg-snapshot and dots used plain sort, which is locale-dependent: the same
package set ordered differently on two machines, so dots reported drift
that did not exist. A maintenance tool that always cries wolf is the exact
failure mode dots exists to avoid.
This commit is contained in:
connor committed 2026-09-14 14:47:26 -04:00
1 parent c0bd4f5b1d
commit 4d4242f103
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -9,11 +9,11 @@ OUT="${REPO}/packages"
mkdir -p "$OUT"
if command -v pacman >/dev/null 2>&1; then
pacman -Qqen | sort > "${OUT}/${HOST}.pacman"
pacman -Qqem | sort > "${OUT}/${HOST}.aur"
pacman -Qqen | LC_ALL=C sort > "${OUT}/${HOST}.pacman"
pacman -Qqem | LC_ALL=C sort > "${OUT}/${HOST}.aur"
echo "wrote ${HOST}.pacman ($(wc -l < "${OUT}/${HOST}.pacman")) and ${HOST}.aur ($(wc -l < "${OUT}/${HOST}.aur"))"
elif command -v apt-mark >/dev/null 2>&1; then
apt-mark showmanual | sort > "${OUT}/${HOST}.apt"
apt-mark showmanual | LC_ALL=C sort > "${OUT}/${HOST}.apt"
echo "wrote ${HOST}.apt ($(wc -l < "${OUT}/${HOST}.apt"))"
else
echo "pkg-snapshot: no pacman or apt-mark on this machine" >&2; exit 1