summaryrefslogtreecommitdiff
path: root/cmdline/apt-key
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 10:25:47 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 10:25:47 +0100
commit4c6cf49317769725fee34a132c52ec1fe076b8b5 (patch)
tree1394a74a187ce61982c6c8649721de2f543459a1 /cmdline/apt-key
parent931dcf2f960c6a2b117ab3cc847ce51c04e2140c (diff)
parent3eb9e257855d83d0486d7a5fa7cc5e2edebb6aaa (diff)
merged from lp:~donkult/apt/sid
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=""