summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-key.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index ab62d4c8f..9da5fceb8 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -281,8 +281,8 @@ if [ -z "$TRUSTEDFILE" ]; then
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
if [ -r "$TRUSTEDFILE" ]; then
GPG="$GPG --keyring $TRUSTEDFILE"
+ GPG="$GPG --primary-keyring $TRUSTEDFILE"
fi
- GPG="$GPG --primary-keyring $TRUSTEDFILE"
TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
if [ -d "$TRUSTEDPARTS" ]; then
@@ -316,6 +316,8 @@ if [ "$command" != "help" ]; then
if [ -w "$(dirname "$TRUSTEDFILE")" ]; then
touch -- "$TRUSTEDFILE"
chmod 0644 -- "$TRUSTEDFILE"
+ GPG="$GPG --keyring $TRUSTEDFILE"
+ GPG="$GPG --primary-keyring $TRUSTEDFILE"
fi
fi
fi