From 4228d79b635d1a2f448492f64eacbe83bc40e0cc Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 5 Apr 2017 15:36:02 -0400
Subject: [PATCH] makechrootpkg: Improve status messages.

In sync_chroot(), this makes the messages be a bit more precise with
exactly which thing they are syncing where.  This is based on my users
expressing confusion at what is going on (especially when something is
taking a long time, and they have to blame something for blocking).
With these changes, I haven't gotten such confusion in a long time
(but maybe my users just got used to it).

In delete_chroot(), this changes "temporary copy" to "chroot copy",
since in Parabola's version of the tools, the function can get called
from other places, and it isn't necessarily operating on a temporary
copy.
---
 makechrootpkg.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 1e46c6e..a8a71ec 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -115,9 +115,10 @@ sync_chroot() {
 	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"
+		slock 8 "$chrootdir/root.lock" \
+			"Locking clean chroot [%s]" "$chrootdir/root"
 
-		stat_busy "Creating clean working copy [%s]" "$copy"
+		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"
@@ -142,7 +143,7 @@ delete_chroot() {
 	local copydir=$1
 	local copy=${1:-$2}
 
-	stat_busy "Removing temporary copy [%s]" "$copy"
+	stat_busy "Removing chroot copy [%s]" "$copy"
 	if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
 		btrfs subvolume delete "$copydir" >/dev/null ||
 			die "Unable to delete subvolume %s" "$copydir"
-- 
GitLab