1 |
commit: 52d5d444ffb144911ca9b6e70b383405a8bd8af6 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 1 06:16:45 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 1 06:16:45 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=52d5d444 |
7 |
|
8 |
emerge-delta-webrsync: uses gpg --status-fd |
9 |
|
10 |
misc/emerge-delta-webrsync | 11 ++++++++++- |
11 |
1 file changed, 10 insertions(+), 1 deletion(-) |
12 |
|
13 |
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync |
14 |
index f2dc8220c..868c6a347 100755 |
15 |
--- a/misc/emerge-delta-webrsync |
16 |
+++ b/misc/emerge-delta-webrsync |
17 |
@@ -267,13 +267,22 @@ check_file_signature() { |
18 |
local signature="$1" |
19 |
local file="$2" |
20 |
local r=1 |
21 |
+ local gnupg_status line |
22 |
|
23 |
if [[ ${WEBSYNC_VERIFY_SIGNATURE} != 0 ]] ; then |
24 |
|
25 |
__vecho "Checking signature ..." |
26 |
|
27 |
if type -P gpg > /dev/null; then |
28 |
- gpg --homedir "${PORTAGE_GPG_DIR}" --verify "$signature" "$file" && r=0 |
29 |
+ if gnupg_status=$(gpg --homedir "${PORTAGE_GPG_DIR}" --batch \ |
30 |
+ --status-fd 1 --verify "${signature}" "${file}"); then |
31 |
+ while read -r line; do |
32 |
+ if [[ ${line} == "[GNUPG:] GOODSIG"* ]]; then |
33 |
+ r=0 |
34 |
+ break |
35 |
+ fi |
36 |
+ done <<< "${gnupg_status}" |
37 |
+ fi |
38 |
else |
39 |
eecho "cannot check signature: gpg binary not found" |
40 |
exit 1 |