Detect the missing official repo dbs by core.db, not any db

pacstrap leaves the offline repo's db in the target's sync dir, so
the any-db glob skipped the first-run update path on real installs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-25 13:50:11 -04:00
co-authored by Claude Fable 5
parent 9bf870449b
commit 0812b28527
+4 -3
View File
@@ -32,9 +32,10 @@ fi
case "$source_type" in case "$source_type" in
aur) aur)
# Offline installs ship no sync db; yay then treats repo deps as AUR. # Offline installs leave only offline.db in sync; without the official
# System upgrades must go through the omarchy-update pipeline (pacman guard). # repo dbs yay treats repo deps as AUR. Upgrades must go through the
if ! compgen -G "/var/lib/pacman/sync/*.db" > /dev/null; then # omarchy-update pipeline (pacman guard).
if [[ ! -f /var/lib/pacman/sync/core.db ]]; then
if [[ ! -t 0 ]]; then if [[ ! -t 0 ]]; then
echo "首次安装应用前请先完成一次系统更新: omarchy-update" >&2 echo "首次安装应用前请先完成一次系统更新: omarchy-update" >&2
exit 1 exit 1