From patchwork Wed Apr 5 19:36:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Shumaker X-Patchwork-Id: 94 Return-Path: Delivered-To: patchwork@archlinux.org Received: from nymeria.archlinux.org by nymeria.archlinux.org (Dovecot) with LMTP id eRbbBElH5ViYagAAtiB/HQ for ; Wed, 05 Apr 2017 21:36:41 +0200 Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id E4F6B406FA; Wed, 5 Apr 2017 21:36:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on nymeria.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.5 tests=BAYES_00,RCVD_IN_DNSWL_MED shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.1 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by nymeria.archlinux.org (Postfix) with ESMTPS; Wed, 5 Apr 2017 21:36:38 +0200 (CEST) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 674302C10D; Wed, 5 Apr 2017 19:36:32 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=none Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id AC0F82C101 for ; Wed, 5 Apr 2017 19:36:30 +0000 (UTC) Received: from mav.lukeshu.com (mav.lukeshu.com [104.207.138.63]) by luna.archlinux.org (Postfix) with ESMTPS for ; Wed, 5 Apr 2017 19:36:30 +0000 (UTC) Received: from build64-par (unknown [IPv6:2601:803:202:9275:21f:e2ff:fe4d:191b]) by mav.lukeshu.com (Postfix) with ESMTPSA id 849E383EB9; Wed, 5 Apr 2017 15:36:29 -0400 (EDT) From: lukeshu@lukeshu.com To: arch-projects@lists.archlinux.org Date: Wed, 5 Apr 2017 15:36:02 -0400 Message-Id: <20170405193603.22277-7-lukeshu@lukeshu.com> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170405193603.22277-1-lukeshu@lukeshu.com> References: <20170405193603.22277-1-lukeshu@lukeshu.com> Subject: [arch-projects] [devtools] [PATCH 6/7] makechrootpkg: Improve status messages. X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Arch Linux projects development discussion Cc: Luke Shumaker Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" X-UID: 241 Status: X-Keywords: Content-Length: 1842 From: Luke Shumaker 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 f22fe49..74c41de 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"