aboutsummaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-10-16 23:16:39 +0200
committerLudovic Courtès <ludo@gnu.org>2017-10-19 23:21:49 +0200
commit8c3488259ea9e8d18a2c5b947cf9a137a12546a6 (patch)
tree216764c0828306b2f7d713d02bf70a9b1d13e266 /guix/utils.scm
parent347fa4aebf0bd5609761b4515578b7040f0b7d3c (diff)
downloadgnu-guix-8c3488259ea9e8d18a2c5b947cf9a137a12546a6.tar
gnu-guix-8c3488259ea9e8d18a2c5b947cf9a137a12546a6.tar.gz
Add (guix progress).
Among other things, this removes (guix utils), (guix ui), (guix config), etc. from the closure of (guix build download), as was the case since 798648515b77507c242752457b4dc17c155bad6e. * guix/utils.scm (<progress-reporter>, call-with-progress-reporter): Move to... * guix/progress.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/build/download.scm (current-terminal-columns) (nearest-exact-integer, duration->seconds, seconds->string) (byte-count->string, progress-bar, string-pad-middle) (rate-limited, progress-reporter/file, dump-port*) (time-monotonic): Move to progress.scm. * guix/scripts/download.scm: Adjust accordingly. * guix/scripts/substitute.scm: Likewise.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm28
1 files changed, 1 insertions, 27 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 2cf9be36df..eb1ec29b32 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -33,7 +33,6 @@
#:autoload (rnrs io ports) (make-custom-binary-input-port)
#:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
#:use-module (guix memoization)
- #:use-module (guix records)
#:use-module ((guix build utils) #:select (dump-port mkdir-p))
#:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync))
#:use-module (ice-9 format)
@@ -95,13 +94,7 @@
call-with-decompressed-port
compressed-output-port
call-with-compressed-output-port
- canonical-newline-port
-
- <progress-reporter>
- progress-reporter
- make-progress-reporter
- progress-reporter?
- call-with-progress-reporter))
+ canonical-newline-port))
;;;
@@ -757,25 +750,6 @@ a location object."
(column . ,(location-column loc))
(filename . ,(location-file loc))))
-
-;;;
-;;; Progress reporter.
-;;;
-
-(define-record-type* <progress-reporter>
- progress-reporter make-progress-reporter progress-reporter?
- (start progress-reporter-start) ; thunk
- (report progress-reporter-report) ; procedure
- (stop progress-reporter-stop)) ; thunk
-
-(define (call-with-progress-reporter reporter proc)
- "Start REPORTER for progress reporting, and call @code{(@var{proc} report)}
-with the resulting report procedure. When @var{proc} returns, the REPORTER is
-stopped."
- (match reporter
- (($ <progress-reporter> start report stop)
- (dynamic-wind start (lambda () (proc report)) stop))))
-
;;; Local Variables:
;;; eval: (put 'call-with-progress-reporter 'scheme-indent-function 1)
;;; End: