summaryrefslogtreecommitdiff
path: root/cmdline/apt-key
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 11:02:46 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 11:02:46 +0100
commit86e2dc4dd728924d71995ebaeb83a4d9abba94d5 (patch)
treeb535bac6a1c5d75a3db5c810fb225c1e26f080b7 /cmdline/apt-key
parentde6d91438ef2e3632615647647099f4c6fa227fa (diff)
parent33e46bc7032c2bcab654ab3f6a0a10ad82264ead (diff)
merged from the debian-sid branch
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 f0b084448..7beedd38d 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"