summaryrefslogtreecommitdiff
path: root/cmdline/apt-key
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-02-08 10:27:51 +0100
committerMichael Vogt <mvo@debian.org>2011-02-08 10:27:51 +0100
commit09b8bd3226a68272f98e4020d10348ff26642500 (patch)
tree1394a74a187ce61982c6c8649721de2f543459a1 /cmdline/apt-key
parent7c748f4aa1bd47089672353fd1a401d1c5c94723 (diff)
parent4c6cf49317769725fee34a132c52ec1fe076b8b5 (diff)
merged from lp:~mvo/apt/mvo (which is really lp:~donkult/apt/sid with some updated comments ;)
Diffstat (limited to 'cmdline/apt-key')
-rwxr-xr-xcmdline/apt-key7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index b39ab12e4..c1e01a776 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -5,7 +5,12 @@ unset GREP_OPTIONS
# We don't use a secret keyring, of course, but gpg panics and
# implodes if there isn't one available
-GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
+GPG_CMD='gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg'
+
+if ! id -u > /dev/null; then
+ GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg"
+fi
+
GPG="$GPG_CMD"
MASTER_KEYRING=""