diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-10-22 20:12:52 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-10-22 20:12:52 +0200 |
commit | 119a749db9c9847e0766860c17109b0f0b6bf349 (patch) | |
tree | 4cdbfcad285124c1abf7b3c1c94666cef55767ce /guix/scripts/substitute.scm | |
parent | 530d9e1555e8d0125dde6893f5f70c7a1ebc2564 (diff) | |
parent | 25669275a1a570cc266128274cb27a22f6a3a318 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-x | guix/scripts/substitute.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 921a7c6790..1fbeed71e8 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -33,13 +33,12 @@ #:use-module (guix pki) #:use-module ((guix build utils) #:select (mkdir-p dump-port)) #:use-module ((guix build download) - #:select (current-terminal-columns - progress-reporter/file - uri-abbreviation nar-uri-abbreviation + #:select (uri-abbreviation nar-uri-abbreviation (open-connection-for-uri . guix:open-connection-for-uri) close-connection store-path-abbreviation byte-count->string)) + #:use-module (guix progress) #:use-module ((guix build syscalls) #:select (set-thread-name)) #:use-module (ice-9 rdelim) @@ -956,19 +955,22 @@ DESTINATION as a nar file. Verify the substitute against ACL." #:abbreviation nar-uri-abbreviation))) (progress-report-port reporter raw))) ((input pids) + ;; NOTE: This 'progress' port of current process will be + ;; closed here, while the child process doing the + ;; reporting will close it upon exit. (decompressed-port (and=> (narinfo-compression narinfo) string->symbol) progress))) ;; Unpack the Nar at INPUT into DESTINATION. (restore-file input destination) (close-port input) - (close-port progress) + + ;; Wait for the reporter to finish. + (every (compose zero? cdr waitpid) pids) ;; Skip a line after what 'progress-reporter/file' printed, and another ;; one to visually separate substitutions. - (display "\n\n" (current-error-port)) - - (every (compose zero? cdr waitpid) pids)))) + (display "\n\n" (current-error-port))))) ;;; |