File gnome-keysign-gpg-2.1.patch of Package gnome-keysign
From 790b34ff33034aad8b9b41c9425249af5508386a Mon Sep 17 00:00:00 2001
From: Tobias Mueller <email@example.com>
Date: Thu, 16 Jun 2016 19:41:43 +0200
Subject: [PATCH] gpg: Parse gpp 2.1 output
Apparently, the data that is returned changed a little bit.
The first field, trust, is set with gpg 2.1 which seems to be empty with
earlier versions. So far, the code used "sec::" to determine whether
a line in the output contains a secret key. That prefix, however,
cannot be used with gpg 2.1 as it prints the trust, as in "sec:u:".
In a first step, that string has been refactored into a variable
(needle). Then, we've changed that string to "sec:" which seems to be
the appropriate prefix.
It works well with gpg 1.4.20 and gpg 2.1.
monkeysign/gpg.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/monkeysign/gpg.py b/monkeysign/gpg.py
index 56d21a1..6377d69 100644
@@ -380,9 +380,10 @@ class Keyring():
if pattern: command += [pattern]
if self.context.returncode == 0:
- for keydata in self.context.stdout.split("sec::"):
+ needle = 'sec:'
+ for keydata in self.context.stdout.split(needle):
if not keydata: continue
- keydata = "sec::" + keydata
+ keydata = needle + keydata
key = OpenPGPkey(keydata)
# check if we already have that key, in which case we
# add to it instead of adding a new key