inferior: Fix cached-channel-instance utime call and return value.

This fixes a bug introduced in 529dce6e98 where
the utime procedure would just get a procedure rather than the actual file.

* inferior.scm (cached-channel-instance):
  Use (cached commit) let-bound to cached-directory instead as value
  to utime and return-value.

Fixes: guix/guix#4042
Change-Id: Ibe7fb78fa68292d70e3bbe4ab9234757510cc539
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
gnuphilic 2025-11-04 17:32:26 +02:00 committed by Ludovic Courtès
parent 824de8a3df
commit 3b9d0e0e5c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -963,10 +963,11 @@ X.509 host certificate; otherwise, warn about the problem and keep going."
(if (file-exists? (cached commits))
(let ((now (current-time)))
(let ((now (current-time))
(cached-directory (cached commits)))
;; Update the mtime on CACHED to reflect usage.
(utime cached now now 0 0 AT_SYMLINK_NOFOLLOW)
cached)
(utime cached-directory now now 0 0 AT_SYMLINK_NOFOLLOW)
cached-directory)
(run-with-store store
(mlet* %store-monad ((instances
-> (latest-channel-instances store channels