[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/17: cache: 'file-expiration-time' uses 'lstat', not 'stat'.
From: |
guix-commits |
Subject: |
02/17: cache: 'file-expiration-time' uses 'lstat', not 'stat'. |
Date: |
Tue, 11 Jul 2023 11:01:31 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit fe3321f91ae331d3f1d4a389f28fdf02f74da7e8
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Jul 11 00:27:31 2023 +0200
cache: 'file-expiration-time' uses 'lstat', not 'stat'.
Fixes a bug whereby 'cached-channel-instance' would potentially consider
cache entries obsolete too early because they refer to items in the
store, which is mounted as 'noatime' on Guix System.
* guix/cache.scm (file-expiration-time): Use 'lstat' and
'false-if-exception' rather than 'stat'. This matches what (guix
scripts shell) does.
---
guix/cache.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guix/cache.scm b/guix/cache.scm
index be0de90e67..6a91c7d3ef 100644
--- a/guix/cache.scm
+++ b/guix/cache.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2013-2017, 2020-2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -55,7 +55,7 @@
time\" computed as its timestamp + TTL seconds. Call TIMESTAMP to obtain the
relevant timestamp from the result of 'stat'."
(lambda (file)
- (match (stat file #f)
+ (match (false-if-exception (lstat file))
(#f 0) ;FILE may have been deleted in the meantime
(st (+ (timestamp st) ttl)))))
- 05/17: gnu: guile-chickadee: Change license to Apache 2.0., (continued)
- 05/17: gnu: guile-chickadee: Change license to Apache 2.0., guix-commits, 2023/07/11
- 10/17: gnu: qbittorrent{,-nox}: Use qt-build-system., guix-commits, 2023/07/11
- 11/17: gnu: rxvt-unicode: Update to 9.31 [fixes CVE-2022-4170]., guix-commits, 2023/07/11
- 12/17: gnu: rxvt-unicode: Use new package style., guix-commits, 2023/07/11
- 15/17: gnu: desktop-file-utils: Format description., guix-commits, 2023/07/11
- 17/17: gnu: gnuplot: Update to 5.4.8., guix-commits, 2023/07/11
- 08/17: gnu: mit-scheme: Fix building, guix-commits, 2023/07/11
- 04/17: avahi: Fix exception when #:timeout is #f., guix-commits, 2023/07/11
- 13/17: gnu: rxvt-unicode: Use helper procedure to make desktop files., guix-commits, 2023/07/11
- 16/17: gnu: gmsh: Update to 4.11.1., guix-commits, 2023/07/11
- 02/17: cache: 'file-expiration-time' uses 'lstat', not 'stat'.,
guix-commits <=