download: Don't report the progress too fast.
author宋文武 <iyzsong@member.fsf.org>
Sat, 16 Sep 2017 20:10:18 +0000 (14:10 -0600)
committer宋文武 <iyzsong@member.fsf.org>
Wed, 20 Sep 2017 11:49:31 +0000 (19:49 +0800)
commit798648515b77507c242752457b4dc17c155bad6e
treebc2eef3747fd694efd5c0c065e56330c8257f453
parentf1b65d0dd964e4c457e660b9289a357447939d93
download: Don't report the progress too fast.

* guix/utils.scm (<progress-reporter>): New record type.
(call-with-progress-reporter): New procedure.
* guix/build/download.scm (dump-port*, rate-limited, progress-reporter/file):
New procedures.
(ftp-fetch, http-fetch): Use 'dump-port*'.
(progress-proc): Remove procedure.
* guix/scripts/substitute.scm (progress-report-port): Rewrite in terms of
<progress-reporter>.
(process-substitution): Adjust accordingly.
guix/build/download.scm
guix/scripts/substitute.scm
guix/utils.scm