Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-04-05 22:20:01 +0200
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-04-05 22:20:01 +0200
commit2243a276e4b84dedc8d362ad66716026688949c0 (patch)
tree30f58febbf12dd4456451877c34bc66ccb88c6d3
parent578a62f1e0713b0df9722470146fb85fb819202c (diff)
makechrootpkg: Unindent as suggested in 2fd5931
-rw-r--r--makechrootpkg.in36
1 files changed, 17 insertions, 19 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index a8a71ec..f6764cb 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -112,27 +112,25 @@ sync_chroot() {
return 1
fi
- if true; then # indent for rebasing/merging purposes
- # Get a read lock on the root chroot to make
- # sure we don't clone a half-updated chroot
- slock 8 "$chrootdir/root.lock" \
- "Locking clean chroot [%s]" "$chrootdir/root"
-
- stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copydir"
- if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
- subvolume_delete_recursive "$copydir" ||
- die "Unable to delete subvolume %s" "$copydir"
- btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null ||
- die "Unable to create subvolume %s" "$copydir"
- else
- mkdir -p "$copydir"
- rsync -a --delete -q -W -x "$chrootdir/root/" "$copydir"
- fi
- stat_done
+ # Get a read lock on the root chroot to make
+ # sure we don't clone a half-updated chroot
+ slock 8 "$chrootdir/root.lock" \
+ "Locking clean chroot [%s]" "$chrootdir/root"
- # Drop the read lock again
- lock_close 8
+ stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copydir"
+ if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
+ subvolume_delete_recursive "$copydir" ||
+ die "Unable to delete subvolume %s" "$copydir"
+ btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null ||
+ die "Unable to create subvolume %s" "$copydir"
+ else
+ mkdir -p "$copydir"
+ rsync -a --delete -q -W -x "$chrootdir/root/" "$copydir"
fi
+ stat_done
+
+ # Drop the read lock again
+ lock_close 8
# Update mtime
touch "$copydir"