gnu: attr: Use invoke instead of system*.
* gnu/packages/attr.scm (attr)[arguments]: Use invoke. Return a boolean from all phase procedures. Add a comment explaining why one call to system* is retained.
This commit is contained in:
		
							parent
							
								
									7837450076
								
							
						
					
					
						commit
						812cee6a07
					
				
					 1 changed files with 13 additions and 8 deletions
				
			
		| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 | 
					;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 | 
				
			||||||
;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
 | 
					;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -42,13 +43,14 @@
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
         (add-after 'configure 'patch-makefile-SHELL
 | 
					         (add-after 'configure 'patch-makefile-SHELL
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (patch-makefile-SHELL "include/buildmacros")))
 | 
					             (patch-makefile-SHELL "include/buildmacros")
 | 
				
			||||||
 | 
					             #t))
 | 
				
			||||||
         (replace 'install
 | 
					         (replace 'install
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (zero? (system* "make"
 | 
					             (invoke "make"
 | 
				
			||||||
                     "install"
 | 
					                     "install"
 | 
				
			||||||
                     "install-lib"
 | 
					                     "install-lib"
 | 
				
			||||||
                             "install-dev"))))
 | 
					                     "install-dev")))
 | 
				
			||||||
         (replace 'check
 | 
					         (replace 'check
 | 
				
			||||||
           (lambda* (#:key target #:allow-other-keys)
 | 
					           (lambda* (#:key target #:allow-other-keys)
 | 
				
			||||||
             ;; Use the right shell.
 | 
					             ;; Use the right shell.
 | 
				
			||||||
| 
						 | 
					@ -57,11 +59,14 @@
 | 
				
			||||||
                (which "sh")))
 | 
					                (which "sh")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
             ;; When building natively, run the tests.
 | 
					             ;; When building natively, run the tests.
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					             ;; Note that we use system* and unconditionally return #t here
 | 
				
			||||||
 | 
					             ;; to ignore the test result, because the tests will fail when
 | 
				
			||||||
 | 
					             ;; the build is performed on a file system without support for
 | 
				
			||||||
 | 
					             ;; extended attributes, and we wish to allow Guix to be built
 | 
				
			||||||
 | 
					             ;; on such systems.
 | 
				
			||||||
             (unless target
 | 
					             (unless target
 | 
				
			||||||
               (system* "make" "tests" "-C" "test"))
 | 
					               (system* "make" "tests" "-C" "test"))
 | 
				
			||||||
 | 
					 | 
				
			||||||
             ;; XXX: Ignore the test result since this is
 | 
					 | 
				
			||||||
             ;; dependent on the underlying file system.
 | 
					 | 
				
			||||||
             #t)))))
 | 
					             #t)))))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     ;; Perl is needed to run tests; remove it from cross builds.
 | 
					     ;; Perl is needed to run tests; remove it from cross builds.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue