From: Christian Couder Date: Tue, 07 Oct 2025 12:29:55 GMT Subject: [PATCH 2/5] lib-gpg: allow tests with the GPGSM prereq first Message-ID: <20251007122958.1089680-3-christian.couder@gmail.com> In-Reply-To: <20251007122958.1089680-1-christian.couder@gmail.com> When the 'GPG' prereq is lazily tested, `mkdir "$GNUPGHOME"` could fail if the "$GNUPGHOME" directory already exists. This can happen if the 'GPGSM' prereq has been lazily tested before as it uses `mkdir -p "$GNUPGHOME"`. To allow the GPGSM prereq to appear before the GPG prereq in some test scripts, let's use `mkdir -p "$GNUPGHOME"` when the 'GPG' prereq is lazily tested too. This will be useful in a following commit. Signed-off-by: Christian Couder --- t/lib-gpg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 937b876bd0..743985efab 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -38,7 +38,7 @@ test_lazy_prereq GPG ' # To export ownertrust: # gpg --homedir /tmp/gpghome --export-ownertrust \ # > lib-gpg/ownertrust - mkdir "$GNUPGHOME" && + mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" && (gpgconf --kill all || : ) && gpg --homedir "${GNUPGHOME}" --import \ -- 2.51.0.438.g6987fc0bae