summaryrefslogtreecommitdiff
path: root/cmdline/apt-key.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-key.in')
-rw-r--r--cmdline/apt-key.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 76fa37123..723af06ff 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -675,8 +675,11 @@ exec '$(escape_shell "${GPG_EXE}")' --ignore-time-conflict --no-options --no-def
# for advanced operations, we might really need a secret keyring after all
if [ -n "$FORCED_SECRET_KEYRING" ] && [ -r "$FORCED_SECRET_KEYRING" ]; then
if ! aptkey_execute "$GPG" -v --batch --import "$FORCED_SECRET_KEYRING" >"${GPGHOMEDIR}/gpgoutput.log" 2>&1; then
- cat >&2 "${GPGHOMEDIR}/gpgoutput.log"
- false
+ # already imported keys cause gpg1 to fail for some reason… ignore this error
+ if ! grep -q 'already in secret keyring' "${GPGHOMEDIR}/gpgoutput.log"; then
+ cat >&2 "${GPGHOMEDIR}/gpgoutput.log"
+ false
+ fi
fi
else
# and then, there are older versions of gpg which panic and implode