File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555
5656 exec { "ensure key ${key_fingerprint} is imported in APT keyring" :
5757 command => " /bin/cat /tmp/${key_fingerprint} | gpg --import --batch --no-default-keyring --keyring ${apt_usr_share_keyring} " ,
58- unless => " /bin/cat /tmp/${key_fingerprint} | gpg --dry-run --import --batch --no-default-keyring --keyring ${apt_usr_share_keyring} 2>&1 | grep 'unchanged: 1'" ,
58+ # the second part extracts the fingerprint of the key from output like "fpr::::A2923DFF56EDA6E76E55E492D3A80E30382E94DE:"
59+ unless => @(" CMD" /L)
60+ /usr/bin/gpg --no-default-keyring --keyring ${apt_usr_share_keyring} --list-keys --with-fingerprint --with-colons | grep \
61+ $(cat /tmp/${key_fingerprint} | gpg --with-colons --with-fingerprint 2>/dev/null | grep ' fpr:' | sed ' s|^fpr||' | tr -d ' :' )
62+ | CMD
5963 }
6064 }
6165
You can’t perform that action at this time.
0 commit comments