New commits:
commit 1998828e64bfe680ca8736f9cbdba68267cbcdd4
Author: Bor Kraljič <pyrobor AT ver.si>
Commit: Bor Kraljič <pyrobor AT ver.si>
libgpg: fixed behaviour if there is more than one keyid found in signature
I hit this bug when I tried to convert spell mplayer to upstream signature
checking.
Conflicts:
var/lib/quill/ChangeLog
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index ef2332b..22beedd 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,6 @@
+2011-09-25 Bor Kraljič <pyrobor AT ver.si>
+ * libgpg: fixed behaviour if there is more than one keyid found in
signature
+
2011-02-13 Bor Kraljič <pyrobor AT ver.si>
* libdeprecation: use UP_TRGGERS instead of TRIGGERS when deprecating
a spell
diff --git a/var/lib/quill/modules/libgpg b/var/lib/quill/modules/libgpg
index 040dedd..2a0accf 100644
--- a/var/lib/quill/modules/libgpg
+++ b/var/lib/quill/modules/libgpg
@@ -268,14 +268,19 @@ function quill_get_spell_keyring() {
# get a hint from the failed verification
message "Creating a keyring from the key that made the signature ..."
$QUILL_SUDO -c "wget --no-check-certificate -nc -P $SOURCE_CACHE
$SPELL_SIGNATURE ${SPELL_SIGNATURE%.*}"
- # get the key id, reuse a var
- SPELL_KEYRING=$(gpg --verify $SOURCE_CACHE/${SPELL_SIGNATURE##*/} 2>&1 |
sed -n 's,^.* key ID ,,p')
+ # get the key id
+ SPELL_KEYRING_KEYS=$(gpg --verify $SOURCE_CACHE/${SPELL_SIGNATURE##*/}
2>&1 | sed -n 's,^.* key ID ,,p')
+
+ # if there is more than one key name keyring by spellname
+ if [[ ${#SPELL_KEYRING_KEYS} -gt 8 ]]; then
+ SPELL_KEYRING=$SPELL.gpg
+ else
+ SPELL_KEYRING=$SPELL_KEYRING_KEYS.gpg
+ fi