diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2018-11-12 20:39:28 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2018-11-12 20:39:28 -0800 |
commit | 67c8d93b603355a0fb8eaf57610a4f0973962c7a (patch) | |
tree | 6fdede732e84c277604f5be3652da3455d9f1184 /_plugins | |
parent | _plugins/wkd: build list of available fingerprints one level up (diff) | |
download | www-67c8d93b603355a0fb8eaf57610a4f0973962c7a.tar.gz www-67c8d93b603355a0fb8eaf57610a4f0973962c7a.tar.bz2 www-67c8d93b603355a0fb8eaf57610a4f0973962c7a.zip |
_plugins/wkd: fixup gpg ordering and explicit readlines
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/wkd.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/_plugins/wkd.rb b/_plugins/wkd.rb index 3c931a4..eaaae11 100644 --- a/_plugins/wkd.rb +++ b/_plugins/wkd.rb @@ -21,10 +21,13 @@ module Gentoo [['current', DEV_KEYRING], ['system', SERVICE_KEYRING]].each do |group, keyring| # build a quick list of all fingerprints in this keyring # IO.popen in a non-block context returns a list of lines - keyring_fps = IO.popen(gpg + ['--list-keys'], 'rt').grep(/^fpr/).map(&:strip).map { |l| l.split(':')[9].upcase } + gpg = GPG_BASE_COMMAND + ['--keyring', keyring] + keyring_fps = IO.popen(gpg + ['--list-keys'], 'rt', + &:readlines).grep(/^fpr:/).map(&:strip).map do |line| + line.split(':')[9] + end.compact.map(&:upcase) # Now loop over users site.data['userinfo'][group].each do |nick, details| - gpg = GPG_BASE_COMMAND + ['--keyring', keyring] begin fps = details['gpgfp'].map do |fp| fp.gsub(/\s+/, '').upcase |