[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: lint: Avoid 'dirname' call at the top level.
From: |
guix-commits |
Subject: |
02/06: lint: Avoid 'dirname' call at the top level. |
Date: |
Mon, 7 Jan 2019 08:41:09 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 54ddb6a154082ecd41d50236d49a267697ff0f4e
Author: Ludovic Courtès <address@hidden>
Date: Mon Jan 7 13:55:32 2019 +0100
lint: Avoid 'dirname' call at the top level.
* guix/scripts/lint.scm (%distro-directory): Wrap in 'mlambda'.
(check-patch-file-names): Adjust accordingly.
---
guix/scripts/lint.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 040480c..9acec48 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -595,7 +595,8 @@ from ~a")
'home-page)))))
(define %distro-directory
- (dirname (search-path %load-path "gnu.scm")))
+ (mlambda ()
+ (dirname (search-path %load-path "gnu.scm"))))
(define (check-patch-file-names package)
"Emit a warning if the patches requires by PACKAGE are badly named or if the
@@ -620,12 +621,12 @@ patch could not be found."
'patch-file-names))
;; Check whether we're reaching tar's maximum file name length.
- (let ((prefix (string-length %distro-directory))
+ (let ((prefix (string-length (%distro-directory)))
(margin (string-length "guix-0.13.0-10-123456789/"))
(max 99))
(for-each (match-lambda
((? string? patch)
- (when (> (+ margin (if (string-prefix? %distro-directory
+ (when (> (+ margin (if (string-prefix? (%distro-directory)
patch)
(- (string-length patch) prefix)
(string-length patch)))
- branch master updated (3b45154 -> 915c6bf), guix-commits, 2019/01/07
- 01/06: Remove (guix build pull)., guix-commits, 2019/01/07
- 02/06: lint: Avoid 'dirname' call at the top level.,
guix-commits <=
- 06/06: gnu: python2-fastlmm: Move to machine-learning.scm., guix-commits, 2019/01/07
- 04/06: gnu: Move Emacs modes for Dedukti to ocaml.scm., guix-commits, 2019/01/07
- 03/06: gnu: Move OCaml packages away from maths.scm., guix-commits, 2019/01/07
- 05/06: gnu: Remove unnecessary build-side module imports., guix-commits, 2019/01/07