aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-27 22:01:51 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-27 22:28:34 +0200
commit5895f2444317ba74eeab21d517c703c3687165c0 (patch)
tree24ac8c0327d8ca6b14c082b7b23423fc45990b8f /guix
parent2a7050abf8ae27d6ee929426cadd3889be611ff8 (diff)
downloadgnu-guix-5895f2444317ba74eeab21d517c703c3687165c0.tar
gnu-guix-5895f2444317ba74eeab21d517c703c3687165c0.tar.gz
store: Work around 'get-bytevector-n' bug that affects 'import-paths'.
Fixes <http://bugs.gnu.org/17591>. * guix/store.scm (process-stderr) <%stderr-read>: Use 'get-bytevector-n!' instead of 'get-bytevector-n'.
Diffstat (limited to 'guix')
-rw-r--r--guix/store.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 0c99e623ec..8c774a6db2 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -397,11 +397,13 @@ encoding conversion errors."
#f)
((= k %stderr-read)
;; Read a byte stream from USER-PORT.
+ ;; Note: Avoid 'get-bytevector-n' to work around
+ ;; <http://bugs.gnu.org/17591> in Guile up to 2.0.11.
(let* ((max-len (read-int p))
- (data (get-bytevector-n user-port max-len))
- (len (bytevector-length data)))
+ (data (make-bytevector max-len))
+ (len (get-bytevector-n! user-port data 0 max-len)))
(write-int len p)
- (put-bytevector p data)
+ (put-bytevector p data 0 len)
(write-padding len p)
#f))
((= k %stderr-next)