mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
channels: Warn about missing introductions.
* guix/channels.scm (latest-channel-instance): Warn when CHANNEL has no introduction and CHECKOUT contains '.guix-authorizations'.
This commit is contained in:
parent
ae1af5d787
commit
5bc4b8e8e3
1 changed files with 19 additions and 10 deletions
|
@ -419,6 +419,15 @@ (define (dot-git? file stat)
|
||||||
(if authenticate?
|
(if authenticate?
|
||||||
(if (channel-introduction channel)
|
(if (channel-introduction channel)
|
||||||
(authenticate-channel channel checkout commit)
|
(authenticate-channel channel checkout commit)
|
||||||
|
(begin
|
||||||
|
(when (file-exists?
|
||||||
|
(string-append checkout "/.guix-authorizations"))
|
||||||
|
(warning (and=> (channel-location channel)
|
||||||
|
source-properties->location)
|
||||||
|
(G_ "channel '~a' lacks 'introduction' field but \
|
||||||
|
'.guix-authorizations' found\n")
|
||||||
|
(channel-name channel)))
|
||||||
|
|
||||||
;; TODO: Warn for all the channels once the authentication interface
|
;; TODO: Warn for all the channels once the authentication interface
|
||||||
;; is public.
|
;; is public.
|
||||||
(when (guix-channel? channel)
|
(when (guix-channel? channel)
|
||||||
|
@ -431,7 +440,7 @@ (define (dot-git? file stat)
|
||||||
(hint (G_ "Add the missing introduction to your
|
(hint (G_ "Add the missing introduction to your
|
||||||
channels file to address the issue. Alternatively, you can pass
|
channels file to address the issue. Alternatively, you can pass
|
||||||
@option{--disable-authentication}, at the risk of running unauthenticated and
|
@option{--disable-authentication}, at the risk of running unauthenticated and
|
||||||
thus potentially malicious code."))))))))
|
thus potentially malicious code.")))))))))
|
||||||
(warning (G_ "channel authentication disabled~%")))
|
(warning (G_ "channel authentication disabled~%")))
|
||||||
|
|
||||||
(when (guix-channel? channel)
|
(when (guix-channel? channel)
|
||||||
|
|
Loading…
Reference in a new issue