X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0497fc4c09c434ea34aa4dbfe773451d9a7082d6..ca0a660c3b63717ffec0305bba95af6930e62c34:/cmdline/apt-key diff --git a/cmdline/apt-key b/cmdline/apt-key index b39ab12e4..3838fafcd 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)" -eq 0 ]; then + GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg" +fi + GPG="$GPG_CMD" MASTER_KEYRING=""