gpg tries to return the primary uid (or newest uid if there is no explicit
primary) first. dak should prefer this address, but we need a list to know the
order of addresses gpg returned.
Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
addresses = key_uid_email_cache.get(fingerprint)
if addresses != None:
return addresses
- addresses = set()
+ addresses = list()
cmd = "gpg --no-default-keyring %s --fingerprint %s" \
% (gpg_keyring_args(), fingerprint)
(result, output) = commands.getstatusoutput(cmd)
for l in output.split('\n'):
m = re_gpg_uid.match(l)
if m:
- addresses.add(m.group(1))
+ addresses.append(m.group(1))
key_uid_email_cache[fingerprint] = addresses
return addresses