summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-07-08 18:14:01 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-07-08 18:16:10 +0200
commit9b2644c2929163183699cf85dbd20cb9d628613f (patch)
tree3993cb9fd0526dd7df211c3153870d624219b680 /etc
parent5d8e505ce5d179f321f2ee80927a8a0bd78979c4 (diff)
downloadguix-9b2644c2929163183699cf85dbd20cb9d628613f.tar.gz
guix-install.sh: Don't initialise ~/.gnupg.
* etc/guix-install.sh (chk_gpg_keyring): Call gpg with ‘--dry-run’.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/guix-install.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 3f05796339..960313d462 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -106,7 +106,9 @@ chk_gpg_keyring()
 { # Check whether the Guix release signing public key is present.
     _debug "--- [ $FUNCNAME ] ---"
 
-    gpg --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || (
+    # Without --dry-run this command will create a ~/.gnupg owned by root on
+    # systems where gpg has never been used, causing errors and confusion.
+    gpg --dry-run --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || (
         _err "${ERR}Missing OpenPGP public key.  Fetch it with this command:"
         echo "  wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --import -"
         exit 1