commit: 52d5d444ffb144911ca9b6e70b383405a8bd8af6
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 1 06:16:45 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Feb 1 06:16:45 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=52d5d444
emerge-delta-webrsync: uses gpg --status-fd
misc/emerge-delta-webrsync | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index f2dc8220c..868c6a347 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -267,13 +267,22 @@ check_file_signature() {
local signature="$1"
local file="$2"
local r=1
+ local gnupg_status line
if [[ ${WEBSYNC_VERIFY_SIGNATURE} != 0 ]] ; then
__vecho "Checking signature ..."
if type -P gpg > /dev/null; then
- gpg --homedir "${PORTAGE_GPG_DIR}" --verify
"$signature" "$file" && r=0
+ if gnupg_status=$(gpg --homedir "${PORTAGE_GPG_DIR}"
--batch \
+ --status-fd 1 --verify "${signature}"
"${file}"); then
+ while read -r line; do
+ if [[ ${line} == "[GNUPG:] GOODSIG"*
]]; then
+ r=0
+ break
+ fi
+ done <<< "${gnupg_status}"
+ fi
else
eecho "cannot check signature: gpg binary not found"
exit 1