diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-05-04 17:54:36 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-05-10 17:01:08 +0200 |
| commit | c9dcd203e5356f13b736d5be121fd61874be1a93 (patch) | |
| tree | 7a581b4e6871e2db834c7d3ed558b8024a4b2247 /tests | |
| parent | f13901f6cbd663019090963664ace72345165461 (diff) | |
pull, time-machine: ‘--allow-untrusted-channels’ takes an argument.
* guix/scripts/pull.scm (%default-options): Change ‘require-trusted-channels?’
to ‘require-trusted-channels’.
(show-help, %options): Support optional argument to
‘--allow-untrusted-channels’.
(channel-list): Adjust accordingly.
* guix/scripts/time-machine.scm (show-help, %options)
(%default-options): Likewise.
* tests/guix-time-machine.sh: Add test.
* doc/guix.texi (Invoking guix pull)
(Invoking guix time-machine): Adjust accordingly.
Suggested-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: I342ebbcc7355953487a5c6c8ac85048943a5ac46
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/guix-time-machine.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/guix-time-machine.sh b/tests/guix-time-machine.sh index 262e3d5fef8..e61232f94fa 100644 --- a/tests/guix-time-machine.sh +++ b/tests/guix-time-machine.sh | |||
| @@ -74,6 +74,17 @@ cat > "$channels_file" <<EOF | |||
| 74 | EOF | 74 | EOF |
| 75 | guix repl -- "$channels_file" | 75 | guix repl -- "$channels_file" |
| 76 | 76 | ||
| 77 | # Under 'pre-inst-env', there are zero trusted channels by default. | ||
| 78 | cat > "$channels_file" <<EOF | ||
| 79 | %default-channels | ||
| 80 | EOF | ||
| 81 | |||
| 82 | # Ignore the user's ~/.config/guix/trusted-channels.scm and ensure this | ||
| 83 | # command fails. | ||
| 84 | XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \ | ||
| 85 | guix time-machine -C "$channels_file" --allow-untrusted-channels=no 2> "$log_file" && false | ||
| 86 | grep "'guix' is not trusted" "$log_file" | ||
| 87 | |||
| 77 | if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null | 88 | if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null |
| 78 | then | 89 | then |
| 79 | # Ignore the user's ~/.config/guix/trusted-channels.scm. Under | 90 | # Ignore the user's ~/.config/guix/trusted-channels.scm. Under |
