From f4697d0da0018e66ae759a9495a82f364cad5ccd Mon Sep 17 00:00:00 2001 Message-ID: In-Reply-To: References: From: Lars-Dominik Braun Date: Sat, 13 May 2023 15:31:06 +0200 Subject: [PATCH 2/8] build-system/python: Ignore symlinks when changing mtime. * guix/build/python-build-system.scm (ensure-no-mtimes-pre-1980): Ignore 'symlink. --- guix/build/python-build-system.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index aa04664b25..8e18d6d0df 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -37,6 +37,7 @@ (define-module (guix build python-build-system) #:use-module (srfi srfi-26) #:export (%standard-phases add-installed-pythonpath + ensure-no-mtimes-pre-1980 site-packages python-version python-build)) @@ -270,7 +271,8 @@ (define* (ensure-no-mtimes-pre-1980 #:rest _) ;; timestamps before 1980. (let ((early-1980 315619200)) ; 1980-01-02 UTC (ftw "." (lambda (file stat flag) - (unless (<= early-1980 (stat:mtime stat)) + (unless (or (<= early-1980 (stat:mtime stat)) + (eq? (stat:type stat) 'symlink)) (utime file early-1980 early-1980)) #t)))) -- 2.41.0