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:
@@ -32,9 +32,10 @@ fi
|
||||
|
||||
case "$source_type" in
|
||||
aur)
|
||||
# Offline installs ship no sync db; yay then treats repo deps as AUR.
|
||||
# System upgrades must go through the omarchy-update pipeline (pacman guard).
|
||||
if ! compgen -G "/var/lib/pacman/sync/*.db" > /dev/null; then
|
||||
# Offline installs leave only offline.db in sync; without the official
|
||||
# repo dbs yay treats repo deps as AUR. Upgrades must go through the
|
||||
# omarchy-update pipeline (pacman guard).
|
||||
if [[ ! -f /var/lib/pacman/sync/core.db ]]; then
|
||||
if [[ ! -t 0 ]]; then
|
||||
echo "首次安装应用前请先完成一次系统更新: omarchy-update" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user