1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 23:55:04 -04:00

pacman-key: print message in populate if signature is missing

Rather than saying it was invalid, tell the user no signature exists.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-09-21 14:04:07 -05:00
parent a7691ba6fd
commit 03e1b4caa9

View File

@ -202,16 +202,24 @@ verify_keyring_input() {
# Verify signatures of keyring files and association revocation files if they exist # Verify signatures of keyring files and association revocation files if they exist
msg "$(gettext "Verifying keyring file signatures...")" msg "$(gettext "Verifying keyring file signatures...")"
local keyring local keyring keyfile
for keyring in "${KEYRINGIDS[@]}"; do for keyring in "${KEYRINGIDS[@]}"; do
if ! "${GPG_PACMAN[@]}" --verify "${KEYRING_IMPORT_DIR}/${keyring}.gpg.sig" &>/dev/null; then keyfile="${KEYRING_IMPORT_DIR}/${keyring}.gpg"
error "$(gettext "The signature of file %s is not valid.")" "${keyring}.gpg" if [[ ! -f "${keyfile}.sig" ]]; then
error "$(gettext "File %s is unsigned, cannot continue.")" "${keyfile}"
ret=1
elif ! "${GPG_PACMAN[@]}" --verify "${keyfile}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${keyfile}"
ret=1 ret=1
fi fi
if [[ -f "${KEYRING_IMPORT_DIR}/${keyring}-revoked" ]]; then keyfile="${KEYRING_IMPORT_DIR}/${keyring}-revoked"
if ! "${GPG_PACMAN[@]}" --verify "${KEYRING_IMPORT_DIR}/${keyring}-revoked.sig" &>/dev/null; then if [[ -f "${keyfile}" ]]; then
error "$(gettext "The signature of file %s is not valid.")" "${keyring}-revoked" if [[ ! -f "${keyfile}.sig" ]]; then
error "$(gettext "File %s is unsigned, cannot continue.")" "${keyfile}"
ret=1
elif ! "${GPG_PACMAN[@]}" --verify "${keyfile}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${keyfile}"
ret=1 ret=1
fi fi
fi fi