diff options
-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 |