index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | scripts/makepkg.sh.in | 9 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5606f65b..4e7b2e6c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -228,6 +228,15 @@ run_pacman() { else cmd=(su root -c "$(printf '%q ' "${cmd[@]}")") fi + local lockfile="$(pacman-conf DBPath)/db.lck" + while [[ -f $lockfile ]]; do + local timer=0 + msg "$(gettext "Pacman is currently in use, please wait...")" + while [[ -f $lockfile ]] && (( timer < 10 )); do + (( ++timer )) + sleep 3 + done + done fi "${cmd[@]}" } |