GNU bug report logs - #42543
lint failure for packages on load path specified with -L

Previous Next

Package: guix;

Reported by: Jack Hill <jackhill <at> jackhill.us>

Date: Sun, 26 Jul 2020 04:21:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: zimoun <zimon.toutoune <at> gmail.com>
To: 42543 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: bug#42543: [PATCH 1/2] scripts: build: Canonicalize 'load-path' option.
Date: Mon, 27 Jul 2020 23:47:53 +0200
Fixes <https://bugs.gnu.org/42543>.
Reported by Jack Hill <jackhill <at> jackhill.us>.

* guix/scripts/build.scm (%standard-build-options): Canonicalize 'load-path'.
---
 guix/scripts/build.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 8ff2fd1910..f41221dd43 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Mark H Weaver <mhw <at> netris.org>
 ;;; Copyright © 2020 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -568,10 +569,11 @@ talking to a remote daemon\n")))
   (list (option '(#\L "load-path") #t #f
                 (lambda (opt name arg result . rest)
                   ;; XXX: Imperatively modify the search paths.
-                  (%package-module-path (cons arg (%package-module-path)))
-                  (%patch-path (cons arg (%patch-path)))
-                  (set! %load-path (cons arg %load-path))
-                  (set! %load-compiled-path (cons arg %load-compiled-path))
+                  (let ((path (canonicalize-path arg)))
+                    (%package-module-path (cons path (%package-module-path)))
+                    (%patch-path (cons path (%patch-path)))
+                    (set! %load-path (cons path %load-path))
+                    (set! %load-compiled-path (cons path %load-compiled-path)))
 
                   (apply values (cons result rest))))
         (option '(#\K "keep-failed") #f #f

base-commit: 7b58d009a952e0c36446a0a5d06582f1e9822bb6
-- 
2.26.2





This bug report was last modified 4 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.