From 50ac1697c3100764382a86ba3953f66fb632ae85 Mon Sep 17 00:00:00 2001 From: "tlimoncelli@stackoverflow.com" Date: Sun, 14 May 2017 17:52:27 -0400 Subject: [PATCH] tools/confidence_test.sh: now works with gnupg-2.0 again --- bin/blackbox_removeadmin | 2 +- tools/test_functions.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/blackbox_removeadmin b/bin/blackbox_removeadmin index 335353d..ddd1fb3 100755 --- a/bin/blackbox_removeadmin +++ b/bin/blackbox_removeadmin @@ -22,7 +22,7 @@ remove_line "$BB_ADMINS" "$KEYNAME" # remove the admin key from the pubring -$GPG --no-permission-warning --homedir="$KEYRINGDIR" --batch --yes --delete-key "$KEYNAME" +$GPG --no-permission-warning --homedir="$KEYRINGDIR" --batch --yes --delete-key "$KEYNAME" || true pubring_path=$(get_pubring_path) vcs_add "$pubring_path" "$KEYRINGDIR/trustdb.gpg" "$BB_ADMINS" diff --git a/tools/test_functions.sh b/tools/test_functions.sh index a0177ec..cff230e 100755 --- a/tools/test_functions.sh +++ b/tools/test_functions.sh @@ -1,5 +1,15 @@ #!/usr/bin/env bash +# NB: This is copied from _blackbox_common.sh +function get_pubring_path() { + : "${KEYRINGDIR:=keyrings/live}" ; + if [[ -f "${KEYRINGDIR}/pubring.gpg" ]]; then + echo "${KEYRINGDIR}/pubring.gpg" + else + echo "${KEYRINGDIR}/pubring.kbx" + fi +} + function PHASE() { echo '********************' echo '********************'