diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2018-11-12 14:20:25 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2018-11-12 14:20:25 -0800 |
commit | e78dcbc523981a6ba90ab83ec8ab12214754504d (patch) | |
tree | 9e0b10c4dd53866d143d5788ddbb1990654e9d8c /_plugins | |
parent | _plugins/wkd: check fingerprint is present (diff) | |
download | www-e78dcbc523981a6ba90ab83ec8ab12214754504d.tar.gz www-e78dcbc523981a6ba90ab83ec8ab12214754504d.tar.bz2 www-e78dcbc523981a6ba90ab83ec8ab12214754504d.zip |
_plugins/wkd: build list of available fingerprints one level up
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/wkd.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/_plugins/wkd.rb b/_plugins/wkd.rb index 1f0dcb1..3c931a4 100644 --- a/_plugins/wkd.rb +++ b/_plugins/wkd.rb @@ -19,11 +19,12 @@ module Gentoo Base32.table = 'ybndrfg8ejkmcpqxot1uwisza345h769' [['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 } + # Now loop over users site.data['userinfo'][group].each do |nick, details| gpg = GPG_BASE_COMMAND + ['--keyring', 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 } begin fps = details['gpgfp'].map do |fp| fp.gsub(/\s+/, '').upcase |