guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: build-system/dub: Let all phases return #T unconditionally.


From: Ricardo Wurmus
Subject: 01/01: build-system/dub: Let all phases return #T unconditionally.
Date: Tue, 13 Nov 2018 04:46:53 -0500 (EST)

rekado pushed a commit to branch core-updates
in repository guix.

commit 05a5721f06acc0ac85f970991307bc52fe91f6de
Author: Ricardo Wurmus <address@hidden>
Date:   Tue Nov 13 10:46:00 2018 +0100

    build-system/dub: Let all phases return #T unconditionally.
    
    * guix/build/dub-build-system.scm (configure, build, check): Return #T
    unconditionally; use INVOKE.
---
 guix/build/dub-build-system.scm | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/guix/build/dub-build-system.scm b/guix/build/dub-build-system.scm
index 9a72e3d..3ab5073 100644
--- a/guix/build/dub-build-system.scm
+++ b/guix/build/dub-build-system.scm
@@ -67,7 +67,8 @@
                 (symlink (string-append path "/lib/dub/" d-basename)
                          (string-append vendor-dir "/" d-basename))))))))
       inputs)
-    (zero? (system* "dub" "add-path" vendor-dir))))
+    (invoke "dub" "add-path" vendor-dir)
+    #t))
 
 (define (grep string file-name)
   "Find the first occurrence of STRING in the file named FILE-NAME.
@@ -88,24 +89,22 @@
 (define* (build #:key (dub-build-flags '())
                 #:allow-other-keys)
   "Build a given DUB package."
-  (if (or (grep* "sourceLibrary" "package.json")
-          (grep* "sourceLibrary" "dub.sdl") ; note: format is different!
-          (grep* "sourceLibrary" "dub.json"))
-    #t
-    (let ((status (zero? (apply system* `("dub" "build" ,@dub-build-flags)))))
-      (substitute* ".dub/dub.json"
-        (("\"lastUpgrade\": \"[^\"]*\"")
-         "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\""))
-      status)))
+  (unless (or (grep* "sourceLibrary" "package.json")
+              (grep* "sourceLibrary" "dub.sdl") ; note: format is different!
+              (grep* "sourceLibrary" "dub.json"))
+    (apply invoke `("dub" "build" ,@dub-build-flags))
+    (substitute* ".dub/dub.json"
+      (("\"lastUpgrade\": \"[^\"]*\"")
+       "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
+  #t)
 
 (define* (check #:key tests? #:allow-other-keys)
-  (if tests?
-    (let ((status (zero? (system* "dub" "test"))))
-      (substitute* ".dub/dub.json"
-        (("\"lastUpgrade\": \"[^\"]*\"")
-         "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\""))
-      status)
-    #t))
+  (when tests?
+    (invoke "dub" "test")
+    (substitute* ".dub/dub.json"
+      (("\"lastUpgrade\": \"[^\"]*\"")
+       "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
+  #t)
 
 (define* (install #:key inputs outputs #:allow-other-keys)
   "Install a given DUB package."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]