gexp: No symlinks for ‘imported-files/derivation’.

Fixes <https://issues.guix.gnu.org/76376>.

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 <ryan@arctype.co>
Change-Id: Idc5b59cd8f0c1217e84c7cbfba64d97d5999429f
This commit is contained in:
Ludovic Courtès 2025-02-25 15:47:19 +01:00
parent 1548403fa7
commit 2447880875
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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)