Browse Source

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'.
version-0.8.3
Ludovic Courtès 8 years ago
parent
commit
5895f24443
  1. 8
      guix/store.scm

8
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)

Loading…
Cancel
Save