aboutsummaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-03-22 22:58:19 +0100
committerLudovic Courtès <ludo@gnu.org>2013-03-22 23:15:34 +0100
commit128663e4c8e8e3c2a56686c6018641ce7bcf92da (patch)
treed00d6111c828fb7d9a16874afba1d4a065ae32d8 /guix/store.scm
parent238f739777f3634c3a987d834519d692216027d0 (diff)
downloadgnu-guix-128663e4c8e8e3c2a56686c6018641ce7bcf92da.tar
gnu-guix-128663e4c8e8e3c2a56686c6018641ce7bcf92da.tar.gz
store: Really disable file name canonicalization for derivation inputs.
* guix/store.scm (write-contents)[call-with-binary-input-file]: Set %FILE-PORT-NAME-CANONICALIZATION to #f. * gnu/packages.scm (search-patch, search-bootstrap-binary): Leave %FILE-PORT-NAME-CANONICALIZATION unchanged. This reverts 9776ebb.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 688ddbe714..4d078c5899 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -238,12 +238,14 @@
"Write SIZE bytes from FILE to output port P."
(define (call-with-binary-input-file file proc)
;; Open FILE as a binary file. This avoids scan-for-encoding, and thus
- ;; avoids any initial buffering.
- (let ((port (open-file file "rb")))
- (catch #t (cut proc port)
- (lambda args
- (close-port port)
- (apply throw args)))))
+ ;; avoids any initial buffering. Disable file name canonicalization to
+ ;; avoid stat'ing like crazy.
+ (with-fluids ((%file-port-name-canonicalization #f))
+ (let ((port (open-file file "rb")))
+ (catch #t (cut proc port)
+ (lambda args
+ (close-port port)
+ (apply throw args))))))
(define (dump in size)
(define buf-size 65536)