index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2011-11-25 15:16:46 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-01-30 21:59:41 -0600 |
commit | 9aa4d9a7b981e48a42203d4c07f729c8b890c62f (patch) | |
tree | 8f8c4e94646010178b5bb3160301bbd508d275cf /scripts | |
parent | 2a73f4e9949e6655d17f15cf123a81568708741d (diff) |
-rw-r--r-- | scripts/pacman-key.sh.in | 11 |
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 947d59f9..80bfa5e3 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -284,8 +284,7 @@ populate_keyring() { verify_keyring_input || exit 1 # Variable used for iterating on keyrings - local key - local key_id + local keys key_id # Add keys from requested keyrings for keyring in "${KEYRINGIDS[@]}"; do @@ -331,13 +330,13 @@ populate_keyring() { local -A revoked_ids for keyring in "${KEYRINGIDS[@]}"; do if [[ -f "${KEYRING_IMPORT_DIR}/${keyring}-revoked" ]]; then - while read key; do - key_id="$("${GPG_PACMAN[@]}" --quiet --with-colons --list-key "${key}" 2>/dev/null | grep ^pub | cut -d: -f5)" - if [[ -n ${key_id} ]]; then + IFS=$'\n' read -r -d '' -a keys < "${KEYRING_IMPORT_DIR}/${keyring}-revoked" + while IFS=: read _ _ _ _ key_id _; do + if [[ -n $key_id ]]; then # Mark this key to be disabled revoked_ids[$key_id]="${keyring}" fi - done < "${KEYRING_IMPORT_DIR}/${keyring}-revoked" + done < <("${GPG_PACMAN[@]}" --quiet --with-colons --list-keys "${keys[@]}" 2>/dev/null) fi done |