index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-02-20 21:35:19 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-02-21 14:16:16 +1000 |
commit | 4b83bcfcee46b6adcb80fc7a9fb85d3af58fb741 (patch) | |
tree | 7c5074622bffde55b7615a6210075223280b7f7a /scripts | |
parent | 477a66cd0e7a1b8f5fb7d3b79d977da2771ee09a (diff) |
-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[@]}" } |