diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-15 11:20:37 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-15 11:20:37 -0600 |
commit | a8c95177c7f9bab8cb7e697c6e925b2fb1c5d342 (patch) | |
tree | ed43f04c4e2aaab033aba23fae4ead687555ca9b /archbuild.in | |
parent | a7ee45d6259e84628599f721abc297f935504fee (diff) | |
parent | a7a05deb37b3db6aa3606f488467f621c40ce32d (diff) |
Merge commit 'a7a0': merge our and their lock functions
Arch's have shorter names, and properly escape the filename.
Ours create the directories, and check if the locks are already open.
The best of both worlds.
When merging the usages of them, I used arch's messages. Ours are too long,
even if they are more informative.
Diffstat (limited to 'archbuild.in')
-rw-r--r-- | archbuild.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archbuild.in b/archbuild.in index 38fb8bf..8e272a1 100644 --- a/archbuild.in +++ b/archbuild.in @@ -51,7 +51,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then [[ -d $copy ]] || continue msg2 "Deleting chroot copy '$(basename "${copy}")'..." - lock_open_write 9 "$copy.lock" "Locking chroot copy '$copy'" + lock 9 "$copy.lock" "Locking chroot copy '$copy'" if [[ "$(stat -f -c %T "${copy}")" == btrfs ]]; then { type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null @@ -68,6 +68,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then "${chroots}/${repo}-${arch}/root" \ "${base_packages[@]}" || abort else + lock 9 "${chroots}/${repo}-${arch}/root.lock" "Locking clean chroot" setarch ${arch} arch-nspawn \ -C "@pkgdatadir@/pacman-${repo}.conf" \ -M "@pkgdatadir@/makepkg-${arch}.conf" \ |