From 24478808756c2787e4cb60d2d0e97f87924d2aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 25 Feb 2025 15:47:19 +0100 Subject: [PATCH] =?UTF-8?q?gexp:=20No=20symlinks=20for=20=E2=80=98imported?= =?UTF-8?q?-files/derivation=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . This is a followup to 149de38d0a2560277ee9bdda2104fbd45608bcb2, which did not suitably follow symlinks. The test case didn’t catch this because, when using ‘--disable-chroot’, the symlink target is accessible within the build environment. * guix/gexp.scm (imported-files/derivation): Call ‘readlink*’ on ‘file-name’. Co-authored-by: Ryan Sundberg Change-Id: Idc5b59cd8f0c1217e84c7cbfba64d97d5999429f --- guix/gexp.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index 9ce6810172b..811cf02a533 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1586,7 +1586,7 @@ to the source files instead of copying them." (define file-pair (match-lambda ((final-path . (? string? file-name)) - (mlet %store-monad ((file (interned-file file-name + (mlet %store-monad ((file (interned-file (readlink* file-name) (basename final-path)))) (return (list final-path file)))) ((final-path . file-like)