@@ -453,14 +453,21 @@ import() {
local importdir
local ret=0
for importdir in "$@"; do
+ if [[ ! -f "${importdir}/pubring.gpg" && ! -f "${importdir}/pubring.kbx" ]]; then
+ error "$(gettext "Both file %s does not exist and could not be imported.")" "${importdir}/pubring.gpg and ${importdir}/pubring.kbx"
+ ret=1
if [[ -f "${importdir}/pubring.gpg" ]]; then
if ! "${GPG_PACMAN[@]}" --quiet --batch --import "${importdir}/pubring.gpg" ; then
error "$(gettext "%s could not be imported.")" "${importdir}/pubring.gpg"
ret=1
fi
- else
- error "$(gettext "File %s does not exist and could not be imported.")" "${importdir}/pubring.gpg"
- ret=1
+ fi
+ if [[ -f "${importdir}/pubring.kbx" ]]; then
+ if ! "${GPG_PACMAN[@]}" --quiet --batch --homedir "${importdir}" --keyring pubring.kbx --export | "${GPG_PACMAN[@]}" --import - ; then
+ error "$(gettext "%s could not be imported.")" "${importdir}/pubring.kbx"
+ ret=1
+ fi
+ fi
fi
done
if (( ret )); then