diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-01-13 01:40:04 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-01-13 01:40:04 +0100 |
commit | 6764f94317be05d2c3b08acdcbb2c4730f0c617d (patch) | |
tree | adcfd0000cbe9a8c614181e39d7cbe7f1e1bc164 /guix/build/union.scm | |
parent | 67ff2bdf6100cc887b0d5aebbcd1f539c634a3dc (diff) | |
parent | 1710ffa4c79c79079ebd4e523eef8883eb2d3953 (diff) | |
download | gnu-guix-6764f94317be05d2c3b08acdcbb2c4730f0c617d.tar gnu-guix-6764f94317be05d2c3b08acdcbb2c4730f0c617d.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'guix/build/union.scm')
-rw-r--r-- | guix/build/union.scm | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/guix/build/union.scm b/guix/build/union.scm index fff795c4d3..961ac3298b 100644 --- a/guix/build/union.scm +++ b/guix/build/union.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com> ;;; @@ -39,6 +39,19 @@ ;;; ;;; Code: +;; This code can be used with the bootstrap Guile, which is Guile 2.0, so +;; provide a compatibility layer. +(cond-expand + ((and guile-2 (not guile-2.2)) + (define (setvbuf port mode . rest) + (apply (@ (guile) setvbuf) port + (match mode + ('line _IOLBF) + ('block _IOFBF) + ('none _IONBF)) + rest))) + (else #f)) + (define (files-in-directory dirname) (let ((dir (opendir dirname))) (let loop ((files '())) @@ -179,10 +192,10 @@ returns #f, skip the faulty file altogether." (reverse dirs-with-file)))) table))) - (setvbuf (current-output-port) _IOLBF) - (setvbuf (current-error-port) _IOLBF) + (setvbuf (current-output-port) 'line) + (setvbuf (current-error-port) 'line) (when (file-port? log-port) - (setvbuf log-port _IOLBF)) + (setvbuf log-port 'line)) (union-of-directories output (delete-duplicates inputs))) |