mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 11:09:41 -05:00
build-system/gnu: Return a boolean from all phase procedures.
* guix/build/gnu-build-system.scm (patch-source-shebangs) (patch-generated-file-shebangs, strip): Return #t. (validate-runpath): Raise an exception if validation fails. Never return #f.
This commit is contained in:
parent
5732008757
commit
e9b23fe8bd
1 changed files with 12 additions and 7 deletions
|
@ -223,7 +223,8 @@ (define* (patch-source-shebangs #:key source #:allow-other-keys)
|
||||||
(lambda (file stat)
|
(lambda (file stat)
|
||||||
;; Filter out symlinks.
|
;; Filter out symlinks.
|
||||||
(eq? 'regular (stat:type stat)))
|
(eq? 'regular (stat:type stat)))
|
||||||
#:stat lstat)))
|
#:stat lstat))
|
||||||
|
#t)
|
||||||
|
|
||||||
(define (patch-generated-file-shebangs . rest)
|
(define (patch-generated-file-shebangs . rest)
|
||||||
"Patch shebangs in generated files, including `SHELL' variables in
|
"Patch shebangs in generated files, including `SHELL' variables in
|
||||||
|
@ -238,7 +239,9 @@ (define (patch-generated-file-shebangs . rest)
|
||||||
#:stat lstat))
|
#:stat lstat))
|
||||||
|
|
||||||
;; Patch `SHELL' in generated makefiles.
|
;; Patch `SHELL' in generated makefiles.
|
||||||
(for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$")))
|
(for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$"))
|
||||||
|
|
||||||
|
#t)
|
||||||
|
|
||||||
(define* (configure #:key build target native-inputs inputs outputs
|
(define* (configure #:key build target native-inputs inputs outputs
|
||||||
(configure-flags '()) out-of-source?
|
(configure-flags '()) out-of-source?
|
||||||
|
@ -461,7 +464,8 @@ (define (strip-dir dir)
|
||||||
(let ((sub (string-append dir "/" d)))
|
(let ((sub (string-append dir "/" d)))
|
||||||
(and (directory-exists? sub) sub)))
|
(and (directory-exists? sub) sub)))
|
||||||
strip-directories)))
|
strip-directories)))
|
||||||
outputs))))
|
outputs)))
|
||||||
|
#t)
|
||||||
|
|
||||||
(define* (validate-runpath #:key
|
(define* (validate-runpath #:key
|
||||||
(validate-runpath? #t)
|
(validate-runpath? #t)
|
||||||
|
@ -504,10 +508,11 @@ (define (file=? file1 file2)
|
||||||
(filter-map (sub-directory output)
|
(filter-map (sub-directory output)
|
||||||
elf-directories)))
|
elf-directories)))
|
||||||
outputs)))
|
outputs)))
|
||||||
(every* validate dirs))
|
(unless (every* validate dirs)
|
||||||
(begin
|
(error "RUNPATH validation failed")))
|
||||||
(format (current-error-port) "skipping RUNPATH validation~%")
|
(format (current-error-port) "skipping RUNPATH validation~%"))
|
||||||
#t)))
|
|
||||||
|
#t)
|
||||||
|
|
||||||
(define* (validate-documentation-location #:key outputs
|
(define* (validate-documentation-location #:key outputs
|
||||||
#:allow-other-keys)
|
#:allow-other-keys)
|
||||||
|
|
Loading…
Reference in a new issue