From 66c9bc35efdf05c2ddccc82fb23a3150b611d565 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 22 Feb 2021 17:58:11 +0100 Subject: packages: 'package-field-location' preserves the original file name. This fixes a regression introduced in 9a38bed2cf32e9462badfa43e74cdd4580e804fc. * guix/packages.scm (package-field-location): Do not shadow the 'file' variable. --- guix/packages.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 57bc148002..7f45417ea2 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -476,11 +476,11 @@ object." (match (package-location package) (($ file line column) (match (search-path %load-path file) - ((? string? file) + ((? string? file-found) (catch 'system-error (lambda () ;; In general we want to keep relative file names for modules. - (call-with-input-file file + (call-with-input-file file-found (lambda (port) (goto port line column) (match (read port) -- cgit 1.4.1