From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 82497158018 for ; Tue, 5 Oct 2021 01:14:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91445E08BD; Tue, 5 Oct 2021 01:14:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77D8DE08BD for ; Tue, 5 Oct 2021 01:14:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9FDFB342F9C for ; Tue, 5 Oct 2021 01:14:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1CA75129 for ; Tue, 5 Oct 2021 01:14:46 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1633396287.2b69063f19a03e9224eeaa6cecd35dd2004127c0.vapier@gentoo> Subject: [gentoo-commits] proj/build-docbook-catalog:master commit in: / X-VCS-Repository: proj/build-docbook-catalog X-VCS-Files: build-docbook-catalog X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 2b69063f19a03e9224eeaa6cecd35dd2004127c0 X-VCS-Branch: master Date: Tue, 5 Oct 2021 01:14:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d1f5fbb7-99a7-4e6a-b625-77134ab22e2a X-Archives-Hash: af9363ce34842ad0ff65ed435ac54d67 commit: 2b69063f19a03e9224eeaa6cecd35dd2004127c0 Author: Mike Frysinger gentoo org> AuthorDate: Tue Oct 5 01:11:27 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Oct 5 01:11:27 2021 +0000 URL: https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=2b69063f add explicit check & error message for /run/lock If the system is missing its lock dir, show an explicit error message instead of confusing bash "file does not exist" errors. Bug: https://bugs.gentoo.org/816303 Signed-off-by: Mike Frysinger gentoo.org> build-docbook-catalog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build-docbook-catalog b/build-docbook-catalog index 9064d72..5b6cd85 100755 --- a/build-docbook-catalog +++ b/build-docbook-catalog @@ -66,7 +66,12 @@ main() { mkdir -p "${ROOT}${ROOTCONFDIR}" || error "could not create ${ROOTCONFDIR}" fi - local lock="${ROOT}/run/lock/build-docbook-catalog.lock" + local lock_dir="${ROOT}/run/lock" + if [[ ! -d ${lock_dir} ]] ; then + error "${lock_dir}: missing critical system path; please create it" + fi + + local lock="${lock_dir}/build-docbook-catalog.lock" ( # Lock the dir to avoid trashing other runs that might # be running parallel.