diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-07 15:01:36 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-28 13:36:44 +0900 |
commit | 79a46d65370418dde29b303bebcb487355564f98 (patch) | |
tree | 004dabae9f7f3e2dd3cce9782142624d5d2d46cc /guix/import | |
parent | 99bf56fd509eccc8281667be38494db2fc01ffd2 (diff) |
gnupg: Automatically fallback to 'always policy when non-interactive.
Previously to this change, the 'guix refresh' download
policy (--key-download)would default to 'interactive', which would throw a
backtrace when guix was invoked with its stdin not connected to a peusdo
terminal (tty). This change makes the new default value 'auto' use
interactive only in an interactive environment, with 'always' used as
fallback.
* doc/guix.texi (Invoking guix refresh): Adjust doc.
* etc/completion/fish/guix.fish: Adjust accordingly.
* etc/completion/zsh/_guix (_guix_list_installed_packages): Likewise.
* guix/gnupg.scm (gnupg-verify*): Change default #:key-download argument value
to 'auto. Update doc. Validate argument. Raise an error in case read-line
returns #<eof>.
* guix/import/gnu.scm (gnu-package->sexp): <#:key-download>: Change default
value to 'auto.
* guix/import/gnu.scm (gnu->guix-package): <#:key-download>: Likewise.
* guix/scripts/import/gnu.scm (%options): Add "auto" to accepted
--key-download values.
(%default-options): Set default key-download option to the 'auto value.
(show-help): Update doc.
* guix/scripts/refresh.scm (show-help): Update doc.
(update-package) <#:key-download>: Change default value to 'auto. Update doc.
* guix/upstream.scm (download-tarball): <#:key-download>: Likewise.
(package-update): Likewise.
Change-Id: Id1ca8fd6d453ca4bc5b372534445e3beab9133a8
Fixes: https://issues.guix.gnu.org/76112
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/import')
-rw-r--r-- | guix/import/gnu.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm index fb61332fb8..e68dc06824 100644 --- a/guix/import/gnu.scm +++ b/guix/import/gnu.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,7 +54,7 @@ '("xz" "lz" "bz2" "tbz2" "gz" "tgz" "Z"))) (define* (gnu-package->sexp package release - #:key (key-download 'interactive)) + #:key (key-download 'auto)) "Return the 'package' sexp for the RELEASE (a <gnu-release>) of PACKAGE (a <gnu-package>), or #f upon failure. Use KEY-DOWNLOAD as the OpenPGP key download policy (see 'download-tarball' for details.)" @@ -106,7 +106,7 @@ download policy (see 'download-tarball' for details.)" #f)))) (define* (gnu->guix-package name - #:key (key-download 'interactive) + #:key (key-download 'auto) #:allow-other-keys) "Return the package declaration for NAME as an s-expression. Use KEY-DOWNLOAD as the OpenPGP key download policy (see 'download-tarball' for |