Simon Tournier <[email protected]> writes:

> Hi Tomas,
>
> On Tue, 12 May 2026 at 22:37, Tomas Volf <[email protected]> wrote:
>
>> --8<---------------cut here---------------start------------->8---
>> channels-base.sex:1:7: warning: channel 'guix' is not trusted
>> channels-base.sex:9:7: warning: channel 'nonguix' is not trusted
>> channels-base.sex:17:7: warning: channel 'wolfsden' is not trusted
>> --8<---------------cut here---------------end--------------->8---
>>
>> but, per documentation, that is now expected.  I am not sure I follow
>> why the warning is necessary even for local files, but it is only
>> warning, so I can simply ignore it I guess.
>
> What was the output of `guix describe -f channels` before getting the
> warnings?  In other words, what was the current channels of the previous
> generation?

Apparently

--8<---------------cut here---------------start------------->8---
(list (channel
       (name 'guix)
       (url "/home/user/src/guix/")
       (branch "master")
       (commit "6f2e5abc0cdf8fffb1732c05f7e9a68afdba1446")
       (introduction
        (make-channel-introduction
         "9edb3f66fd807b096b48283debdcddccfea34bad"
         (openpgp-fingerprint
          "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
--8<---------------cut here---------------end--------------->8---

> Well, without the file  ~/.config/guix/trusted-channels.scm, the trusted
> channels are given by (current-channels) and the trusting mechanism
> compares the introductions.  Since you are using a mirror of Guix but
> with the same introduction, it should not warn about the channel ’guix’;
> or you were some channels where none of them has the Guix channel
> introduction.

Based on the description above you are right it should not warn about
the 'guix channel, nevertheless, it does.

I have tested with following patch

--8<---------------cut here---------------start------------->8---
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index a82cd932b42..9cc9cf65ca1 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -777,6 +777,7 @@ (define* (check-trusted-channels channels #:optional 
(handling 'error))
        #t)))
 
   (unless (fold (let ((trusted (trusted-channels)))
+                  (pk trusted)
                   (lambda (channel good?)
                     (if (channel-introduction channel)
                         (if (find (cut equivalent-channels? <> channel)
--8<---------------cut here---------------end--------------->8---

And I got the following output:

--8<---------------cut here---------------start------------->8---
;;; (())
channels-base.sex:1:7: warning: channel 'guix' is not trusted
--8<---------------cut here---------------end--------------->8---

Notice the empty list in there.  However `guix describe' gives me the
following:

--8<---------------cut here---------------start------------->8---
Git checkout:
  repository: /home/user/src/guix/
  branch: master
  commit: 6f2e5abc0cdf8fffb1732c05f7e9a68afdba1446
--8<---------------cut here---------------end--------------->8---

So, for some reason, guix-pull and guix-describe disagree regarding what
the current channels are.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to