diff options
Diffstat (limited to 'guix/scripts/pull.scm')
| -rw-r--r-- | guix/scripts/pull.scm | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 8474f28ea6e..0e7f8684f23 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | (graft? . #t) | 79 | (graft? . #t) |
| 80 | (debug . 0) | 80 | (debug . 0) |
| 81 | (verbosity . 1) | 81 | (verbosity . 1) |
| 82 | (require-trusted-channels? . #t) | 82 | (require-trusted-channels . default) |
| 83 | (isolated-channel-evaluation? . #t) | 83 | (isolated-channel-evaluation? . #t) |
| 84 | (authenticate-channels? . #t) | 84 | (authenticate-channels? . #t) |
| 85 | (verify-certificate? . #t) | 85 | (verify-certificate? . #t) |
| @@ -105,8 +105,9 @@ Download and deploy the latest version of Guix.\n")) | |||
| 105 | --disable-authentication | 105 | --disable-authentication |
| 106 | disable channel authentication")) | 106 | disable channel authentication")) |
| 107 | (display (G_ " | 107 | (display (G_ " |
| 108 | --allow-untrusted-channels | 108 | --allow-untrusted-channels[=yes|no] |
| 109 | when downloading channels, allow untrusted channels")) | 109 | whether to allow untrusted channels (default: yes |
| 110 | for local channel files, no otherwise)")) | ||
| 110 | (display (G_ " | 111 | (display (G_ " |
| 111 | --unsafe-channel-evaluation | 112 | --unsafe-channel-evaluation |
| 112 | evaluate channels file with the full user authority")) | 113 | evaluate channels file with the full user authority")) |
| @@ -198,9 +199,14 @@ Download and deploy the latest version of Guix.\n")) | |||
| 198 | (option '("disable-authentication") #f #f | 199 | (option '("disable-authentication") #f #f |
| 199 | (lambda (opt name arg result) | 200 | (lambda (opt name arg result) |
| 200 | (alist-cons 'authenticate-channels? #f result))) | 201 | (alist-cons 'authenticate-channels? #f result))) |
| 201 | (option '("allow-untrusted-channels") #f #f | 202 | (option '("allow-untrusted-channels") #f #t |
| 202 | (lambda (opt name arg result) | 203 | (lambda (opt name arg result) |
| 203 | (alist-cons 'require-trusted-channels? #f result))) | 204 | (alist-cons 'require-trusted-channels |
| 205 | (match (and arg (string-downcase arg)) | ||
| 206 | ("yes" #f) | ||
| 207 | ("no" #t) | ||
| 208 | (_ 'default)) | ||
| 209 | result))) | ||
| 204 | (option '("unsafe-channel-evaluation") #f #f | 210 | (option '("unsafe-channel-evaluation") #f #f |
| 205 | (lambda (opt name arg result) | 211 | (lambda (opt name arg result) |
| 206 | (alist-cons 'isolated-channel-evaluation? #f result))) | 212 | (alist-cons 'isolated-channel-evaluation? #f result))) |
| @@ -821,8 +827,8 @@ transformations specified in OPTS (resulting from '--url', '--commit', or | |||
| 821 | (define isolated? | 827 | (define isolated? |
| 822 | (assoc-ref opts 'isolated-channel-evaluation?)) | 828 | (assoc-ref opts 'isolated-channel-evaluation?)) |
| 823 | 829 | ||
| 824 | (define require-trusted-channels? | 830 | (define require-trusted-channels |
| 825 | (assoc-ref opts 'require-trusted-channels?)) | 831 | (assoc-ref opts 'require-trusted-channels)) |
| 826 | 832 | ||
| 827 | (define (load-channels file) | 833 | (define (load-channels file) |
| 828 | (let* ((url? (or (string-prefix? "https://" file) | 834 | (let* ((url? (or (string-prefix? "https://" file) |
| @@ -839,10 +845,13 @@ transformations specified in OPTS (resulting from '--url', '--commit', or | |||
| 839 | ;; When downloading channels, keep going if and only if these are | 845 | ;; When downloading channels, keep going if and only if these are |
| 840 | ;; channels the user trusts. | 846 | ;; channels the user trusts. |
| 841 | (check-trusted-channels result | 847 | (check-trusted-channels result |
| 842 | (if (and (or url? swhid?) | 848 | (match require-trusted-channels |
| 843 | require-trusted-channels?) | 849 | ((? boolean? x) |
| 844 | 'error | 850 | (if x 'error 'warning)) |
| 845 | 'warning)) | 851 | ('default |
| 852 | (if (or url? swhid?) | ||
| 853 | 'error | ||
| 854 | 'warning)))) | ||
| 846 | result) | 855 | result) |
| 847 | (leave (G_ "'~a' did not return a list of channels~%") file)))) | 856 | (leave (G_ "'~a' did not return a list of channels~%") file)))) |
| 848 | 857 | ||
